Computer Graphics · Color and Display

The CIE 1931 Colour Matching Functions and What Chromaticity Discards

How two colour matches determine three unknowns, why the 1931 observer needs negative values, and what information survives when XYZ is projected to xy.

The human retina has three cone types with different spectral sensitivities, plus rods that operate at low light levels and contribute little to colour under normal viewing. Colour is therefore a three-dimensional quantity, but not because three is a natural number for light: it is three because the observer has three independent channels. A colour match between two spectra means the three cone responses agree, which is a system of three equations in as many unknowns as the spectra have degrees of freedom. The 1931 standard observer is an attempt to express that matching behaviour in a fixed basis so that colour can be computed from a spectrum without simulating a retina.

Two matches pin down three numbers

The experimental method behind the colour matching functions is worth understanding, because the negative lobe in the red function is a direct consequence of it. An observer views a split field. One half shows a monochromatic test light of some wavelength, the other shows a mixture of three fixed primaries — a red, a green, and a blue. The observer adjusts the three primary intensities until the two halves match.

For most wavelengths a match is achievable with all three intensities positive. But for wavelengths in the blue-green region, the test light cannot be matched by any positive mixture of the chosen primaries: the mixture is always either too red or too blue. The observer’s solution is to move one primary across the field, adding it to the test light rather than to the mixture. Adding light to one side of the comparison is algebraically a negative coefficient on that primary in the mixture. The recorded values are therefore allowed to be negative, and the tabulated $r(\lambda)$, $g(\lambda)$, $b(\lambda)$ functions have a region of negative values in the red function spanning roughly 440–550 nm, reaching a minimum near 470 nm.

Three primaries chosen differently would move that negative region, but it cannot be eliminated: any real set of three primaries has a gamut, and the spectral locus is not contained in any three-primary gamut that uses physically realizable primaries. The negative lobe is a property of the constraint that primaries must be real light, not of the observer.

The linear transform to XYZ

Working with negative tristimulus values is inconvenient analytically, and more importantly the numbers depend on which three primaries the experimenter happened to use. The 1931 committee defined a linear transformation of the RGB tristimulus space into a new basis $X$, $Y$, $Z$ chosen so that:

  • $Y$ is proportional to luminance, so that the photopic luminous efficiency function $V(\lambda)$ is exactly the $\bar{y}$ colour matching function;
  • the transformation matrix has all-positive coefficients, so the $\bar{x}$, $\bar{y}$, $\bar{z}$ functions are non-negative for every wavelength;
  • the $Z$ function is zero for the long-wavelength end, so the plane $Z = 0$ is tangent to the spectral locus.

The all-positive matrix is possible only because the RGB values it operates on include negatives; a matrix with positive entries times a vector with negative entries can produce a positive result. So the XYZ space is not free of the observer’s negativity — it has moved it out of the tabulated functions and into the relationship between XYZ and physically realizable light. Any real spectrum has all three tristimulus values non-negative; the constraint that reappears is that not every triple of non-negative XYZ values corresponds to a real spectrum. That is the same fact as the empty corners of the chromaticity diagram, and it is why a colour outside the spectral locus cannot be produced by any light.

The transformation is exact and invertible: the 1931 RGB primaries and the XYZ basis are related by a fixed 3×3 matrix, and the sRGB and Rec. 2020 primary sets are related to XYZ by their own matrices. The derivation of those matrices from primary chromaticities and a white point is treated in deriving an RGB-to-XYZ matrix.

Chromaticity: dividing out the intensity

Given $X, Y, Z$, the chromaticity coordinates are

$$x = \frac{X}{X + Y + Z}, \qquad y = \frac{Y}{X + Y + Z}$$

with $z = 1 - x - y$ implied. The projection is a central projection onto the plane $X + Y + Z = 1$: every point along the ray through the origin maps to the same chromaticity. Two colours with the same chromaticity differ only in intensity, which is not quite true perceptually — the appearance of a chromatic colour shifts with luminance, an effect called the Bezold–Broca shift, and the Abney effect describes a related hue shift when a chromatic light is desaturated with white — but it is true of the tristimulus algebra, which is the level at which the projection is defined. The two-dimensional diagram is a lossy view of a three-dimensional space, and everything about absolute brightness is discarded.

QuantityDimensionWhat the projection removes
$X, Y, Z$3nothing
$x, y$2overall scale, i.e. $X + Y + Z$
$\lambda$ locus1-D curve in $(x,y)$all spectral power distributions on the line of purples collapse

The spectral locus is the image of monochromatic light: as $\lambda$ runs from about 380 nm to 780 nm, the chromaticity traces a horseshoe-shaped curve. The straight segment closing the horseshoe connects the two ends; no monochromatic light lies on it, and colours on that line are mixtures of the extreme long and short wavelengths, hence “line of purples”. The interior of the closed region contains every colour producible by some non-negative spectrum. The region outside contains no real light at all.

The horseshoe’s asymmetry is a statement about the observer, not about the physics of light: the eye’s sensitivity to the long-wavelength end of the visible range falls off far faster than the eye’s ability to distinguish wavelengths there, producing the near-vertical right edge where a large wavelength range maps to a small chromaticity range.

Metamerism and the limits of three numbers

A tristimulus triple is a projection of an infinite-dimensional spectrum onto three dimensions, so the map is dramatically many-to-one. Two spectra with different shapes but the same XYZ values are metamers: indistinguishable to this observer under this illuminant, and distinguishable to an observer with different cone sensitivities, or to a spectrometer. Practical consequences follow directly.

An ink formulation matched under one illuminant can mismatch under another because the spectra differ even though the tristimulus values coincided; this is the reason a colour approval made under a specific lamp does not transfer to daylight. A camera’s sensor does not implement the CIE observer — real sensors have different, often narrower, spectral sensitivities, and their colour matrices approximate the observer by a least-squares fit whose error is worst for saturated colours and for narrow-band sources. An RGB primary set with a wide gamut can represent colours that no monitor of a different primary set can display, and the representation is exact while the display is not, which is the subject of gamut mapping.

The reverse direction is where most pipelines go wrong: XYZ values that are not inside the spectral locus get converted to RGB and clamped, silently moving a colour that was never displayable in the first place. A negative RGB channel from a colour conversion is not an error in the arithmetic; it is the arithmetic reporting that the target primaries cannot produce the colour. Clamping destroys that information, and the usual consequence is a hue shift at the gamut boundary that looks like a channel mix-up but is a gamut limitation.

/* RGB tristimulus from a spectrum, given 5 nm-spaced matching functions. */
void spectrum_to_xyz(const float *power, const float *bx,
                     const float *by, const float *bz, int n,
                     float *X, float *Y, float *Z) {
    double x = 0.0, y = 0.0, z = 0.0;
    for (int i = 0; i < n; i++) {
        x += (double)power[i] * bx[i];
        y += (double)power[i] * by[i];
        z += (double)power[i] * bz[i];
    }
    *X = (float)x; *Y = (float)y; *Z = (float)z;   /* 5 nm spacing folds the step into the sum */
}

The integration step matters: the tabulated functions are sampled at intervals from 1 nm to 5 nm, and a sum must be scaled by the interval to be an integral. Since both the matching functions and the spectrum are sampled on the same grid, the constant factor cancels in any ratio such as chromaticity, which is why implementations that only need $(x, y)$ routinely omit it.

Two observers and two standard illuminants

The 1931 observer was derived from matches made with a 2° field of view. Later work established that a larger field produces a different matching behaviour, because the macular pigment and the distribution of cones vary across the retina, and the 1964 supplementary observer is defined for a 10° field. The two differ measurably in the short-wavelength region and slightly elsewhere; using one where the other is specified shifts chromaticities by amounts that matter for tolerance work but not for ordinary rendering.

Illuminant definitions follow the same pattern. D65 is defined as a daylight spectrum with a correlated colour temperature of 6504 K, and its chromaticity is a fixed pair of numbers in the 1931 observer regardless of how the spectrum is synthesized. E is the equal-energy spectrum, whose chromaticity is at $x = y = 1/3$ by construction and which is therefore a common test case for matrix derivations rather than a real light source.

The reason these are specified as points rather than as spectra is the whole point of the projection: within the tristimulus model, a light source is characterized for adaptation purposes by its chromaticity alone, since the model has no other handle on it. That is also the model’s limitation. A source with a strong spectral line and a broad source with the same chromaticity will render metamers differently, and the tristimulus model cannot express the difference.

References

  1. Commission Internationale de l'Eclairage Proceedings, 1931 — CIE, Cambridge University Press
  2. Colorimetry, 4th Edition (CIE 015:2018) — CIE
  3. Color Science: Concepts and Methods, Quantitative Data and Formulae — Günther Wyszecki and W. S. Stiles, Wiley