Tag Archives: XYZ

Colour Matching and Cones

Earlier today I posted something on quora about who many colours there are. It’s quite a long post. You can read it here. However, if you want the short cut the answer is 3-5 million. 🙂

However, I also linked to the post on LinkedIn and someone asked me a question about the relationship between colour-matching functions and cone sensitivities so I thought I would make a new post today about that topic. I have used my message on LinkedIn as the basis for this post but modified it a little to make it suitable for general consumption.

Here are two diagrams:

This shows the actual spectral sensitivities of the MLS cones in the human eye

The 1931 CIE XYZ colour-matching functions

It’s another common misconception that people get these two diagrams confused. The cone spectral sensitivities are the actual sensitivities of the cones in the eye. Although people often say that the eye responds mainly to red, green and blue light, it’s not so simple.  In 1931 the CIE measured the colour matching functions. One of the reasons that they did this was that in 1931 we didn’t actually know what the cone spectral sensitivities were; these were only known for sure in 1964. So in 1931 the CIE measured the amounts of three primary lights that an observer would mix together (additively) in order to match a single wavelength of light. And they did this for each wavelength. The second of the diagrams above shows the amounts of each of the primaries needed to match each wavelength on the spectrum.  Originally, the CIE used three lights (these were RGB)  or primaries. However, they mathematically transformed their RGB colour matching functions to create the XYZ colour matching functions. These are sometimes also known as the CIE colour matching functions or the CIE standard observer.

These are the original CIE RGB colour-matching functions

The point of these (XYZ) colour matching functions are that they allow us to calculate the CIE tristimulus values XYZ of an object if we know the spectral reflectance of the object and the light it is viewed in. The XYZ values are the amounts of the three XYZ primaries that an observer would, on average, use to match that object viewed in that light source. If two samples have the same XYZ values then they are a visual match; because an observer would, on average, use the same amounts of the XYZ primaries to match each. And this was the whole point of the CIE system; to determine when two colour stimuli are a visual match.  Had we known the cone spectral sensitivities in 1931 it’s possible that history would have taken a different course and that instead of having CIE XYZ we would simply calculate the cone responses LMS. And we could say that if two samples have the same cone responses they are a visual match. But I guess we’ll never know.

Now, if two samples have the same XYZ values then they will have the same cone responses. This is a bit technical but this is true because the cone spectral sensitivities are a linear transform of the CIE XYZ colour matching functions. They are also a linear transform of the CIE RGB colour-matching functions.

The colour-matching functions depend upon which primaries are used whereas the cone spectral sensitivities are more fundamental. Doesn’t this make the colour-matching functions arbitrary? Not really. Although the actual shapes of the colour-matching functions depend upon the actual primaries used, the matching condition does not. If two samples generate the same cone responses then the observer would match them with the same amounts of the XYZ primaries and the same amounts of the RGB primaries.

On this page – https://en.wikipedia.org/wiki/CIE_1931_color_space – you can see the cone spectral sensitivities and the RGB and XYZ colour matching functions.