Why colour is exactly three-dimensional
The colour-matching experiment is simple enough to describe in a sentence. A field is split in two; one half is lit with a single wavelength; the observer adjusts the intensities of three fixed primary lights on the other half until the two halves look identical. Repeat for every wavelength across the spectrum, and the result is three curves — how much of each primary is needed, wavelength by wavelength.
For a substantial part of the spectrum, the experiment fails. No amount of the three primaries matches the test light.
What the observer does when the match is impossible
The failure has a fix, and the fix is what makes the subject interesting.
When no mixture of the three primaries matches the test light, the observer moves one primary to the other side — adding it to the half of the field containing the test wavelength rather than the half containing the mixture. Once a match is reached, the amount added there is recorded as a negative quantity.
That is not a bookkeeping trick. It is a statement about what the equation means. The observer has established
which rearranges to the matching equation with in it. The algebra is consistent; the physical realisation is not, because there is no such thing as a negative quantity of light.
Why the shortfall happens
Any single primary excites more than one cone class, because the cone sensitivity curves overlap heavily — the L and M peaks are only twenty-five nanometres apart. There is no way to stimulate the M cone alone, because anything that excites M excites L as well.
A pure spectral cyan near 490 nm excites M and S strongly and L rather little. Any mixture of red, green and blue primaries that produces enough M inevitably drags L along with it, so the mixture is always less saturated than the test light. Subtracting the excess L means adding red to the test side, which is exactly what the observer does.
So the negative lobes are a direct consequence of the receptors overlapping, and any three real primaries have them somewhere. Choosing better primaries moves the negative region; it never removes it.
The geometric statement
This is the same fact as the gamut triangle, seen from the other end.
Mixing primaries in non-negative amounts reaches the triangle they span. The spectral locus is convex and curved, so it lies partly outside any triangle whose corners are on or inside it. A wavelength outside the triangle needs a negative coefficient — the coefficients of a point are its barycentric coordinates with respect to the triangle, and points outside have at least one negative.
The curvature of the locus therefore is the negative lobes, and both are consequences of the cone curves overlapping. A hypothetical eye with three non-overlapping receptors would have a triangular locus, no negative lobes, and a display that could reproduce every visible colour with three primaries.
What XYZ is for
Negative numbers were an obstacle in 1931 in a way that is easy to forget. The calculations were done by hand, by people, on paper. Sign errors are the commonest arithmetic mistake there is, and a system requiring the multiplication of tables containing negatives was a system that would produce wrong answers in industrial practice.
The CIE’s response was to change coordinates. There is nothing sacred about the primaries used in the experiment; any invertible linear transformation of the three matching functions describes the same observer, since the information is the same. So they chose a transformation making all three functions non-negative everywhere.
The cost is that the new primaries are not real. X, Y and Z are outside the spectral locus, which means they are not lights and cannot be lights; they are colours more saturated than any wavelength. They are sometimes called imaginary primaries, which is precise: the same sense in which is imaginary, and useful for the same reason.
Two further conveniences were built into the choice at the same time:
- was made identical to the photopic luminous efficiency function , so that Y is luminance. This is why luminance falls out of a colour calculation without extra work, and why the three functions cannot be permuted.
- The white point of an equal-energy spectrum was placed at exactly, which is a definition and not an approximation. It is also the cheapest available check on a table of matching functions: get the relative scaling of the three wrong and equal-energy white moves off that point immediately.
What this does not explain
Trichromacy explains why the space has three dimensions. It says nothing about which three dimensions the visual system actually uses downstream, and the answer there is not L, M and S.
The retina recombines the cone signals almost immediately into opponent channels: roughly light-versus-dark, red-versus-green, and blue-versus-yellow. This is why no colour is simultaneously reddish and greenish, why the afterimage of red is green, and why the four unique hues — red, green, yellow, blue — feel more fundamental than orange or turquoise despite having no special status in the cone responses.
Opponent processing and trichromacy were treated as rival theories for most of the nineteenth century, Hering against Helmholtz, and the resolution is that both are right at different stages. Three receptors, then three opponent channels computed from them. The dimensionality survives the recombination; the axes do not.
The count in other species
Most placental mammals are dichromats, having lost two of the four cone classes present in early vertebrates during a long nocturnal period. Old-world primates re-evolved a third by duplicating the long-wavelength gene, which is why the L and M curves sit almost on top of one another — they are recent copies rather than an evolved spread.
Birds, reptiles and many fish retained four, frequently including an ultraviolet class. Their colour space is four-dimensional, their matching experiments would require four primaries, and their metamers are not the same as a human observer’s. A pair of surfaces matching for a human is generally distinguishable to a bird, which is worth remembering whenever “the colour of” some animal marking is discussed.
The mantis shrimp is often cited as having twelve or sixteen receptor classes and therefore extraordinary colour vision. The behavioural evidence suggests the opposite: it appears to discriminate colours worse than a human, and the many receptors are thought to support fast recognition rather than fine discrimination. Dimensionality of the receptor space and quality of colour vision are not the same quantity.
The consequence for reproduction
The negative lobes have a direct engineering translation, and it is the whole story of why displays cannot show everything.
The two pictures are the same fact. A chromaticity outside the triangle is one whose barycentric coordinates include a negative, and a negative coordinate means the matching experiment failed and the primary had to be moved to the other side of the field. A display has no other side of the field, so it clips.
The limit is geometric rather than technological. Three points span a triangle; the locus is curved; a triangle inscribed in a convex curve touches it at three points and misses everywhere else. More primaries would help — four, five, six-primary displays exist and reach a polygon rather than a triangle — and no finite number reaches the curve.
What the dimension count does not settle
Two things follow from trichromacy and two things do not, and the pairs get confused.
It does follow that three numbers describe a stimulus completely, and that three primaries suffice for reproduction. Both are strong claims and both are true.
It does not follow that the space is naturally divided into three hues, and it does not follow that any particular three colours are fundamental. “Red, green and blue are the primary colours” is a statement about a convenient choice of basis, not about vision. The same observer is described equally well by XYZ, by LMS, by the RGB primaries of the original matching experiments, or by any other invertible transformation. Arguing about which triple is real is arguing about coordinates.
Nor does it follow that the perceptual axes are the receptor axes. The opponent recombination described above means the axes people actually experience — light-dark, red-green, blue-yellow — are computed from the cone signals rather than being them, which is why the traditional artist’s primaries of red, yellow and blue are not nonsense either. They are a reasonable basis for a subtractive mixture with a different set of constraints, and the perennial argument about whether the primaries are RGB or RYB is a confusion between two different questions.
The experiment as it was actually run
The description at the top compresses a piece of laboratory work that took years, and some of the details are load-bearing.
Wright and Guild used a bipartite field of about two degrees — a patch roughly the size of a thumbnail at arm’s length — because the fovea’s cone mosaic is not uniform beyond that, and because the macular pigment covering the central retina absorbs strongly in the blue. That choice is why the 1931 observer is the two-degree observer, and why a second, ten-degree observer was needed later for the larger fields that occur in practical colour matching.
The primaries were monochromatic: Wright used 650, 530 and 460 nm, Guild used broadband filters and converted. Both sets were transformed to a common basis before averaging, and the transformation required knowing each observer’s own primaries precisely — which is where much of the experimental care went.
The matches were also made at a fixed luminance and in a dark surround, both of which matter. A match made against one surround is not guaranteed to hold against another, and that limitation propagates into everything built on the data.
Why the transformation was not unique
The CIE chose one transformation from RGB to XYZ, and it is worth being clear that many others would have worked.
The requirements were: all three functions non-negative everywhere, equal to the luminous efficiency function, equal-energy white at one third, and the resulting primaries as close to the locus as the non-negativity permits so that little of the space is wasted. Those constraints pin the transformation nearly but not entirely, and the final choice involved judgement.
That is worth knowing because it puts XYZ in the right category. It is not a discovery about vision. It is a coordinate system chosen in 1931 by a committee, optimised for hand computation, and retained since because everything else was built on top of it. The observer data underneath it is empirical; the axes are a convention.
Later systems have made different choices from the same data — CIELAB, CIELUV, and more recently Oklab are all transformations aimed at perceptual uniformity rather than computational convenience, which was not a design goal in 1931 and turned out to matter more.
What was computed here
The matching functions shown are tabulated data — they are measurements of people, and this site quotes measurements. Everything downstream of them is computed.
The checks that matter are the two mentioned above. Equal-energy illuminant must land at , and the computed value is with a maximum error of . D65 must land at , and it does, to . Both are definitional targets rather than approximations, so any drift means the table is wrong rather than the tolerance being tight.
A third check ties the two halves of the site together. The sRGB primaries are converted to XYZ through a matrix derived independently from their chromaticities, and the white point that falls out must agree with the one the spectral integration produces from the D65 spectrum. Those two routes share no code, and requiring them to agree is what would catch an error in either.
What the pictures cannot show
The negative lobes are not drawn here, and cannot be usefully drawn as colours, since a negative amount of a primary has no appearance. They can be plotted as a curve dipping below an axis, which is a graph of a coefficient rather than a picture of a colour.
More fundamentally, the imaginary primaries cannot be shown at all. X, Y and Z lie outside the locus, so they are not merely outside the display gamut — they are outside the set of things light can do. Every figure on this site that says “outside the gamut” is making a much weaker claim than that.
Who found it, and when
Newton established in the 1660s that white light is composite and that spectral colours are not further decomposable. Young proposed three receptors in 1802 and Helmholtz developed it. Maxwell ran quantitative matching experiments in the 1850s with spinning discs, and understood that the results implied a three-dimensional space.
The negative-coefficient problem was familiar to everyone doing the experiment through the nineteenth century. The CIE’s 1931 meeting adopted the XYZ transformation, based on matching data from William Wright and John Guild, collected from a total of seventeen observers. That system is still in use, essentially unmodified, and every colour specification in industrial practice descends from it.
Where this goes next
The consequence for reproduction is what a gamut costs, which is the negative-lobe problem in its engineering form. The provenance of the functions themselves is seventeen observers in 1931. And for what happens when the receptors are not three, simulating what cannot be simulated takes up the dichromatic case.