Wednesday, August 26, 2015

Saturated colors look brighter than greys

Graphics people are pretty used to converting RGB colors to "luminance", and usually things that have higher luminance look brighter.    For sRGB the standard formula is:

Y = 0.2126 R + 0.7152 G + 0.0722 B

The (R,G,B) here is linear.   To get it linear you need a gamma of approximately 2.2 (see the wikipedia page for the exact transform which is linear for low values).

 If we go with a linear Y of 0.0722, these pure saturated colors are all the same luminance:

(0, 0, 1.0)
(0, 0.1, 0)
(0.34, 0, 0)

In 8bit RGB after gamma these would be equal Y RGB:

(77, 77, 77)
(0, 0, 255)
(0, 90, 0)
(156, 0, 0)

This is an image with those colors:


Note the blue and red probably look brighter to you even through they "should" be the same luminance.   The green is about the same brightness as the grey for me on my computer.   There are many places in calibration and cross-computer image viewing that would explain some of why these are not all the same subjective brightness.   But a contributing effect is almost certainly the Helmholtz-Kohlrausch effect, where saturated colors appear brighter than neutral colors.   It's good to be aware of this because it can make you think your math is wrong when in fact your perceptual system is just complicated!





5 comments:

Unknown said...

Huh, I'd never heard of this effect (and shame on me, I taught data visualization last semester!).

I'm pretty surprised that someone hasn't tried to create a coordinate system that corrects this. The most popular "perceptually-accurate" parametrization these days is a polar coordinate transformation of the uv in Luv (often called "HCL", where C is "Chroma", and H is Hue). It's like HSV and HSL but the L is actually the L in Luv.

I just checked and (of course) the luminance of those three colors is about the same, but their chroma is quite different. I now want an undergrad to run the experiment where we fit a corrected L* curve that is a function of L and C and which corrects for Helmholtz-Kohlrausch.

Or *has* someone designed this corrected color coordinate system, and I'm just being doubly ignorant?

Unknown said...

Ugh, so this paper claims this is also dependent on the dominant wavelength: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2659800/

Color is hard.

Daniel said...

Did you use the sRGB gamma<->linear conversion formulas as well?

Peter Shirley said...

That paper about dominant wavelength is really interesting and it implies the blue should look especially bright. Really cool paper thanks! (and color is so hard you can get a PhD in it!)

Peter Shirley said...

This was news to me until recently as well. "Or *has* someone designed this corrected color coordinate system, and I'm just being doubly ignorant?" I am not aware of such a model, but there may indeed be one (for example, I have never looked at Hunt's model from a decade or so ago).

As for gamma, I will make another post.