1
$\begingroup$

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?

$\endgroup$
3
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.