Why Colour Correction Only Needs Two Sliders
Duncan Davidson (who I still think of as James) asked on Twitter:
Color Temp works on the Blue/Yellow axis. Tint on the Green/Magenta. No need to tweak Red/Cyan?
I responded there but decided to here as well as I've talked about colour theory before.
The basic answer is that you only need two axes because colour (disregarding brightness/luminance) is two-dimensional. Red, Green and Blue form a triangle in that two-dimensional space (with Cyan, Magenta and Yellow being on the opposite edges respectively).
Basic linear algebra tells us that, in an n-dimensional space, you only need n vectors to form a basis (actually, that's the definition of dimensionality) so you can adjust any point in two-dimensional colour space by translating it by a linear combination of any two, non-parallel vectors. Incidentally, Hue and Saturation would be almost polar coordinates on this space.
Because one form of colour modification is colour temperature, it makes sense to roughly make one of the axes the yellow-blue direction. I think the magenta-green axes is largely arbitrary. Any other axis would have done fine.
Note I say "roughly" the first time in that previous paragraph because the black-body colours aren't a straight line in standard colour models.
Hmm, that makes me wonder if colour correction sliders represent rectilinear bases at all.
UPDATE (2008-05-04): According to a reply in the Reddit thread, the slides aren't rectilinear but are based on the black-body colours. The so-called "tint" is presumably then orthogonal to black-body line (the Planckian locus)
Comments (10)
James Tauber on April 29, 2008:
Matte on April 30, 2008:
James Tauber on April 30, 2008:
Interestingly, those two colour channels involve the blue-yellow and red-cyan axes, not the blue-yellow and green-magenta axes.
Image compression algorithms like JPEG take advantage of the eyes extra sensitivity to distinction in green and so use more bits for the luma channel than the two chroma channels (which, because of the choice of axes, aren't conveying any green information)
Robert Johnston on April 30, 2008:
nex on April 30, 2008:
Wrong! JPEG uses more bits (and in a way also a better resolution) for luma because human eyes are more sensitive to exactly that -- luminosity -- than to colour. Yes, they're more sensitive to green as well, which is why 16bit colour modes often have 5 bits for red and blue each and 6 bits for green. But suppose you have 8 bits for red, green, and blue each. And then you decide you don't save one of these channels in a file, because you already have a 24bit luma channel. Well, it doesn't matter which channel you left out; all of the information is still there, implicitly. But what happens when you apply lossy compression to the two colour channels you kept? Well, the third -- implicitly (instead of explicitly) defined -- channel _also_ loses information, because retrieving it depends on the other two channels! So, the scheme quoted above cannot work, it's utter nonsense.
James Tauber on April 30, 2008:
zBard on April 30, 2008:
Your two sliders are not going to have singular colours varying in intensity - but will have different colours in the same slider which have to be selected.
Carrying this example further - you could have a single slider with all possible colours, and you go around selecting them : effectively a scalar list of all the the possible discrete values from which you can pick.
James Duncan Davidson on May 3, 2008:
A second plausible reason is that, in the majority of light sources that don't resemble black body radiators, Green is exactly the component you want to subtract or otherwise tweek. Again, I haven't found hard documentation of this one the web... /sigh/
nex on May 3, 2008:
In the real world, you have light of all kinds of wavelengths, which are perceived as different colours, and you have eyes with three kinds of light receptors that are more sensitive to some wavelengths than others, but also a kind of receptor that basically just cares about luminosity. Here, you have lots of odd curves (as opposed, to simple, linear math), you have physics, biochemistry, psychology ... no way I could rush in and make (hopefully helpful) wisecracks about _that_ :-)
But back on our screen, we have R, G and B values, and we can put them through some transformation and represent them through three different values, e.g. G + R, G + B, R + B. These values don't have to be orthogonal; e.g. we could have a representation that specifies 3*G + R, G + 2*B, 4*R + 3*B. We'd still be able to figure out the values for R, G, B that we have to put up on our monitor, and we'd still be able to represent all the different colours our monitor can show. However, the three values must be linearly independent.
Imagine a format that specifies luma, yellow, and blue. To our monitor, that would be R + G + B, R + G, B. Uh-oh! Any of these values can be expressed through a combination of the two remaining ones. So actually we're only specifying two components here, not three, which is just not enough to tickle all possible colours out of the screen. That's why yellow/blue would be just one slider when luma is a given.
Thus, mathematically speaking, it doesn't matter which axes we use, as long as they're linearly independent. In practical terms, digital formats have limited precision and analog circuitry has its limitations as well, so you wouldn't want to store or transmit pictures with a weird arrangement of axes that result in significant rounding errors or noise when transformed back into R, G, B values. What exact axes you use still doesn't really matter.
Back on the topic of colour correction and the user interface elements you use for it: When you don't want luma to change, obviously now you need two values instead of three, and they still have to be linearly independent. If one slider is yellow/blue, the other one could be green/magenta, or it could also be cyan/red. Either choice is good, and I vcery much doubt one of them is more representative of human perception. (OTOH, perception of colours has been shown to depend on your native language, so ...) To the computer, it doesn't make a real difference. It just comes down to what the user prefers. Which is why your photo processing app might have six different sliders, where only two are technically needed. You could have even more sliders. One day you might want to balance yellow against blue, another day you might rather want to balance orange against blue.
Now, whether colour is two-dimensional or not depends on your definition of colour. To a painter who thinks in terms of hues, tints, shades, saturaion, ..., it may have more than two dimensions. Two a child choosing from a rainbow of crayons it may have one dimension. But to a photographer who colour-corrects a shot, it does have two. The fact that the "triangle representation", which neatly maps onto the colours a screen or print can show, doesn't quite cover all possible colours we can see has little to do with that.
Add a Comment
Last Modified: May 5, 2008
Author: jtauber
JJ on April 29, 2008: