MadSci Network: Computer Science

Subject: How do RGB values relate to luminance?

Date: Sun Sep 5 16:39:08 1999
Posted by Josh Rossow
Grade level: 10-12 School: Herreid
City: Herreid State/Province: SD Country: 57632
Area of science: Computer Science
ID: 936563948.Cs

I am looking for a way to convert 24bit colors into greyscale colors for a 
program I am writing.  From experimentation and observations from an image 
editing  program, I think it is somehow related to the luminance values of 
the 24bit color.  For example the color (in RGB) 0,82,251 has a luminance 
of 118.  Converted to greyscale it is 75,75,75 with a luminance of 71.  A 
grey scale color's luminance is proportional to it's RGB.(71 is 94.6% of 
75)  I can't seem to find a connection between the luminance and the RGB 
in colors that have different red, green, and blue values though.  Does it 
have something to do with the hue and saturation?

Re: How do RGB values relate to luminance?

Current Queue | Current Queue for Computer Science | Computer Science archives

Try the links in the MadSci Library for more information on Computer Science.

MadSci Home | Information | Search | Random Knowledge Generator | MadSci Archives | Mad Library | MAD Labs | MAD FAQs | Ask a ? | Join Us! | Help Support MadSci

MadSci Network,
© 1995-1999. All rights reserved.