I have a color (say $R=100, G=150, B=130$). How do I compute its intensity?
Do I just sum up all three components? Or are the colors not evenly weighted?
Asked By : David Faux
Answered By : Pål GD
The colors are not evenly interpreted by our eyes. When I want to make a picture gray scale, I usually go for the following calculation of the luminance of a pixel.
luminance = (r * 0.3) + (g * 0.59) + (b * 0.11)
Read more in the Stackoverflow question Formula to determine brightness of RGB color.
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/11876
0 comments:
Post a Comment
Let us know your responses and feedback