Thread: Color->Greyscale

  1. #1
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718

    Color->Greyscale

    How would you determine from the RGB values the lightness of a pixel?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  2. #2
    Banal internet user
    Join Date
    Aug 2002
    Posts
    1,380
    By using this formula (assuming you have an RGB to work with)

    Luminance == (RED * 0.3) + (GREEN * 0.59) + (BLUE * 0.11)

Popular pages Recent additions subscribe to a feed