CIE 1931 color space


The CIE 1931 color spaces are the first defined quantitative links between distributions of wavelengths in the electromagnetic visible spectrum, and physiologically perceived colors in human color vision. The mathematical relationships that define these color spaces are essential tools for color management, important when dealing with color inks, illuminated displays, and recording devices such as digital cameras. The system was designed in 1931 by the "Commission Internationale de l'éclairage", known in English as the International Commission on Illumination.
The CIE 1931 RGB color space and CIE 1931 XYZ color space were created by the International Commission on Illumination in 1931. They resulted from a series of experiments done in the late 1920s by William David Wright using ten observers and John Guild using seven observers. The experimental results were combined into the specification of the CIE RGB color space, from which the CIE XYZ color space was derived.
The CIE 1931 color spaces are still widely used, as is the 1976 CIELUV color space.

Tristimulus values

The human eye with normal vision has three kinds of cone cells that sense light, having peaks of spectral sensitivity in short, middle, and long wavelengths. These cone cells underlie human color perception in conditions of medium and high brightness; in very dim light color vision diminishes, and the low-brightness, monochromatic "night vision" receptors, denominated "rod cells", become effective. Thus, three parameters corresponding to levels of stimulus of the three kinds of cone cells, in principle describe any human color sensation. Weighting a total light power spectrum by the individual spectral sensitivities of the three kinds of cone cells renders three effective values of stimulus; these three values compose a tristimulus specification of the objective color of the light spectrum. The three parameters, denoted "S", "M", and "L", are indicated using a 3-dimensional space denominated the "LMS color space", which is one of many color spaces devised to quantify human color vision.
A color space maps a range of physically produced colors from mixed light, pigments, etc. to an objective description of color sensations registered in the human eye, typically in terms of tristimulus values, but not usually in the LMS color space defined by the spectral sensitivities of the cone cells. The tristimulus values associated with a color space can be conceptualized as amounts of three primary colors in a tri-chromatic, additive color model. In some color spaces, including the LMS and XYZ spaces, the primary colors used are not real colors in the sense that they cannot be generated in any light spectrum.
The CIE XYZ color space encompasses all color sensations that are visible to a person with average eyesight. That is why CIE XYZ is a device-invariant representation of color. It serves as a standard reference against which many other color spaces are defined. A set of color-matching functions, like the spectral sensitivity curves of the LMS color space, but not restricted to non-negative sensitivities, associates physically produced light spectra with specific tristimulus values.
Consider two light sources composed of different mixtures of various wavelengths. Such light sources may appear to be the same color; this effect is denominated "metamerism". Such light sources have the same apparent color to an observer when they produce the same tristimulus values, regardless of the spectral power distributions of the sources.
Most wavelengths stimulate two or all three kinds of cone cell because the spectral sensitivity curves of the three kinds overlap. Certain tristimulus values are thus physically impossible, for example LMS tristimulus values that are non-zero for the M component and zero for both the L and S components. Furthermore, LMS tristimulus values for pure spectral colors would, in any normal trichromatic additive color space, e. g. the RGB color spaces, imply negative values for at least one of the three primaries because the chromaticity would be outside the color triangle defined by the primary colors. To avoid these negative RGB values, and to have one component that describes the perceived brightness, "imaginary" primary colors and corresponding color-matching functions were formulated. The CIE 1931 color space defines the resulting tristimulus values, in which they are denoted by "X", "Y", and "Z". In XYZ space, all combinations of non-negative coordinates are meaningful, but many, such as the primary locations , , and , correspond to imaginary colors outside the space of possible LMS coordinates; imaginary colors do not correspond to any spectral distribution of wavelengths and therefore have no physical reality.

Meaning of ''X'', ''Y'' and ''Z''

When judging the relative luminance of different colors in well-lit situations, humans tend to perceive light within the green parts of the spectrum as brighter than red or blue light of equal power. The luminosity function that describes the perceived brightnesses of different wavelengths is thus roughly analogous to the spectral sensitivity of M cones.
The CIE model capitalizes on this fact by setting Y as luminance. Z is quasi-equal to blue, or the S cone response, and X is a mix of response curves chosen to be nonnegative. The XYZ tristimulus values are thus analogous to, but different from, the LMS cone responses of the human eye. Setting Y as luminance has the useful result that for any given Y value, the XZ plane will contain all possible chromaticities at that luminance.
The unit of the tristimulus values,, and is often arbitrarily chosen so that or is the brightest white that a color display supports. In this case, the Y value is known as the relative luminance. The corresponding whitepoint values for and can then be inferred using the standard illuminants.

CIE standard observer

Due to the distribution of cones in the eye, the tristimulus values depend on the observer's field of view. To eliminate this variable, the CIE defined a color-mapping function called the standard observer, to represent an average human's chromatic response within a 2° arc inside the fovea. This angle was chosen owing to the belief that the color-sensitive cones resided within a 2° arc of the fovea. Thus the CIE 1931 Standard Observer function is also known as the CIE 1931 2° Standard Observer. A more modern but less-used alternative is the CIE 1964 10° Standard Observer, which is derived from the work of Stiles and Burch, and Speranskaya.
For the 10° experiments, the observers were instructed to ignore the central 2° spot. The 1964 Supplementary Standard Observer function is recommended when dealing with more than about a 4° field of view. Both standard observer functions are discretized at wavelength intervals from to and distributed by the CIE. All corresponding values have been calculated from experimentally obtained data using interpolation. The standard observer is characterized by three color matching functions.
The derivation of the CIE standard observer from color matching experiments is given [|below], after the description of the CIE RGB space.

Color matching functions

The CIE's color matching functions, and are the numerical description of the chromatic response of the observer. They can be thought of as the spectral sensitivity curves of three linear light detectors yielding the CIE tristimulus values X, Y and Z. Collectively, these three functions are known as the CIE standard observer.
The CIE XYZ color matching functions can be approximated by a sum of Gaussian functions, as follows:
Let g denote a general Gaussian function, defined by
That is, g resembles a bell curve with its peak at , a spread/standard deviation of σ to the left of the mean, spread of σ to the right of the mean, and scaling parameter α. With the wavelength λ measured in angstroms, we then approximate the color matching functions as follows:
This approximation can be easily employed in a programming language in a functional style. For example, here is a Haskell implementation:

xyzOfWavelength λ = map

,
,
]
where g = α/1000 * exp/)^2 / 2)

Here is a semi-functional style implementation in C:

double gaussian
void xyzFromWavelength

The CIE XYZ color matching functions are nonnegative, and lead to nonnegative XYZ coordinates for all real colors. Other observers, such as for the CIE RGB space or other RGB color spaces, are defined by other sets of three color-matching functions, not generally nonnegative, and lead to tristimulus values in those other spaces, which may include negative coordinates for some real colors.

Computing XYZ from spectral data

Emissive case

The tristimulus values for a color with a spectral radiance Le,Ω,λ are given in terms of the standard observer by:
where is the wavelength of the equivalent monochromatic light, and customary limits of the integral are.
The values of X, Y, and Z are bounded if the radiance spectrum Le,Ω,λ is bounded.

Reflective and transmissive cases

The reflective and transmissive cases are very similar to the emissive case, with a few differences. The spectral radiance Le,Ω,λ is replaced by the spectral reflectance S of the object being measured, multiplied by the spectral power distribution of the illuminant I.
where
K is a scaling factor, and is the wavelength of the equivalent monochromatic light, and the standard limits of the integral are.

CIE xy chromaticity diagram and the CIE xyY color space

Since the human eye has three types of color sensors that respond to different ranges of wavelengths, a full plot of all visible colors is a three-dimensional figure. However, the concept of color can be divided into two parts: brightness and chromaticity. For example, the color white is a bright color, while the color grey is considered to be a less bright version of that same white. In other words, the chromaticity of white and grey are the same while their brightness differs.
The CIE XYZ color space was deliberately designed so that the Y parameter is a measure of the luminance of a color. The chromaticity is then specified by the two derived parameters x and y, two of the three normalized values being functions of all three tristimulus values X, Y, and Z:
The derived color space specified by x, y, and Y is known as the CIE xyY color space and is widely used to specify colors in practice.
The X and Z tristimulus values can be calculated back from the chromaticity values x and y and the Y tristimulus value:
The figure on the right shows the related chromaticity diagram. The outer curved boundary is the spectral locus, with wavelengths shown in nanometers. Note that the chromaticity diagram is a tool to specify how the human eye will experience light with a given spectrum. It cannot specify colors of objects, since the chromaticity observed while looking at an object depends on the light source as well.
Mathematically the colors of the chromaticity diagram occupy a region of the real projective plane.
The chromaticity diagram illustrates a number of interesting properties of the CIE XYZ color space:
When two or more colors are additively mixed, the x and y chromaticity coordinates of the resulting color may be calculated from the chromaticities of the mixture components and their corresponding luminances with the following formulas:
These formulas can be derived from the previously presented definitions of x and y chromaticity coordinates by taking advantage of the fact that the tristimulus values X, Y, and Z of the individual mixture components are directly additive. In place of the luminance values one can alternatively use any other photometric quantity that is directly proportional to the tristimulus value Y.
As already mentioned, when two colors are mixed, the resulting color xmix,ymix will lie on the straight line segment that connects these colors on the CIE xy chromaticity diagram. To calculate the mixing ratio of the component colors x1,y1 and x2,y2 that results in a certain xmix,ymix on this line segment, one can use the formula
where L1 is the luminance of color x1,y1 and L2 the luminance of color x2,y2. Note that because ymix is unambiguously determined by xmix and vice versa, knowing just one or the other of them is enough for calculating the mixing ratio. Also note that, in accordance with the remarks concerning the formulas for xmix and ymix, the mixing ratio L1/L2 may well be expressed in terms of other photometric quantities than luminance.

Definition of the CIE XYZ color space

CIE RGB color space

The CIE RGB color space is one of many RGB color spaces, distinguished by a particular set of monochromatic primary colors.
In the 1920s, two independent experiments on human color perception were conducted by W. David Wright with ten observers, and John Guild with seven observers. Their results laid the foundation for the trichromatic CIE XYZ color space specification.
The experiments were conducted by using a circular split screen 2 degrees in diameter, which is the angular size of the human fovea. On one side a test color was projected while on the other an observer-adjustable color was projected. The adjustable color was a mixture of three primary colors, each with fixed chromaticity, but with adjustable brightness.
The observer would alter the brightness of each of the three primary beams until a match to the test color was observed. Not all test colors could be matched using this technique. When this was the case, a variable amount of one of the primaries could be added to the test color, and a match with the remaining two primaries was carried out with the variable color spot. For these cases, the amount of the primary added to the test color was considered to be a negative value. In this way, the entire range of human color perception could be covered. When the test colors were monochromatic, a plot could be made of the amount of each primary used as a function of the wavelength of the test color. These three functions are called the color matching functions for that particular experiment.
Although Wright and Guild's experiments were carried out using various primaries at various intensities, and although they used a number of different observers, all of their results were summarized by the standardized CIE RGB color matching functions,, and, obtained using three monochromatic primaries at standardized wavelengths of , and . The color matching functions are the amounts of primaries needed to match the monochromatic test primary. These functions are shown in the plot on the right. Note that and are zero at, and are zero at and and are zero at, since in these cases the test color is one of the primaries. The primaries with wavelengths and were chosen because they are easily reproducible monochromatic lines of a mercury vapor discharge. The wavelength, which in 1931 was difficult to reproduce as a monochromatic beam, was chosen because the eye's perception of color is rather unchanging at this wavelength, and therefore small errors in wavelength of this primary would have little effect on the results.
The color matching functions and primaries were settled upon by a CIE special commission after considerable deliberation. The cut-offs at the short- and long-wavelength side of the diagram are chosen somewhat arbitrarily; the human eye can actually see light with wavelengths up to about, but with a sensitivity that is many thousand times lower than for green light. These color matching functions define what is known as the "1931 CIE standard observer". Note that rather than specify the brightness of each primary, the curves are normalized to have constant area beneath them. This area is fixed to a particular value by specifying that
The resulting normalized color matching functions are then scaled in the r:g:b ratio of 1:4.5907:0.0601 for source luminance and 72.0962:1.3791:1 for source radiance to reproduce the true color matching functions. By proposing that the primaries be standardized, the CIE established an international system of objective color notation.
Given these scaled color matching functions, the RGB tristimulus values for
a color with a spectral power distribution would then be given by:
These are all inner products and can be thought of as a projection of an infinite-dimensional spectrum to a three-dimensional color.

Grassmann's law

One might ask: "Why is it possible that Wright and Guild's results can be summarized using different primaries and different intensities from those actually used?" One might also ask: "What about the case when the test colors being matched are not monochromatic?" The answer to both of these questions lies in the linearity of human color perception. This linearity is expressed in Grassmann's law.
The CIE RGB space can be used to define chromaticity in the usual way: The chromaticity coordinates are r, g and b where:

Construction of the CIE XYZ color space from the Wright–Guild data

Having developed an RGB model of human vision using the CIE RGB matching functions, the members of the special commission wished to develop another color space that would relate to the CIE RGB color space. It was assumed that Grassmann's law held, and the new space would be related to the CIE RGB space by a linear transformation. The new space would be defined in terms of three new color matching functions
,, and as described above. The new color space would be chosen to have the following desirable properties:
  1. The new color matching functions were to be everywhere greater than or equal to zero. In 1931, computations were done by hand or slide rule, and the specification of positive values was a useful computational simplification.
  2. The color matching function would be exactly equal to the photopic luminous efficiency function V for the "CIE standard photopic observer". The luminance function describes the variation of perceived brightness with wavelength. The fact that the luminance function could be constructed by a linear combination of the RGB color matching functions was not guaranteed by any means but might be expected to be nearly true due to the near-linear nature of human sight. Again, the main reason for this requirement was computational simplification.
  3. For the constant energy white point, it was required that.
  4. By virtue of the definition of chromaticity and the requirement of positive values of x and y, it can be seen that the gamut of all colors will lie inside the triangle , , . It was required that the gamut fill this space practically completely.
  5. It was found that the color matching function could be set to zero above while remaining within the bounds of experimental error. For computational simplicity, it was specified that this would be so.
In geometrical terms, choosing the new color space amounts to choosing a new triangle in rg chromaticity space. In the figure above-right, the rg chromaticity coordinates are shown on the two axes in black, along with the gamut of the 1931 standard observer. Shown in red are the CIE xy chromaticity axes which were determined by the above requirements. The requirement that the XYZ coordinates be non-negative means that the triangle formed by Cr, Cg, Cb must encompass the entire gamut of the standard observer. The line connecting Cr and Cb is fixed by the requirement that the function be equal to the luminance function. This line is the line of zero luminance, and is called the alychne. The requirement that the function be zero above means that the line connecting Cg and Cr must be tangent to the gamut in the region of Kr. This defines the location of point Cr. The requirement that the equal energy point be defined by puts a restriction on the line joining Cb and Cg, and finally, the requirement that the gamut fill the space puts a second restriction on this line to be very close to the gamut in the green region, which specifies the location of Cg and Cb. The above described transformation is a linear transformation from the CIE RGB space to XYZ space. The standardized transformation settled upon by the CIE special commission was as follows:
The numbers in the conversion matrix below are exact, with the number of digits specified in CIE standards.
While the above matrix is exactly specified in standards, going the other direction uses an inverse matrix that is not exactly specified, but is approximately:
The integrals of the XYZ color matching functions must all be equal by requirement 3 above, and this is set by the integral of the photopic luminous efficiency function by requirement 2 above. The tabulated sensitivity curves have a certain amount of arbitrariness in them. The shapes of the individual X, Y and Z sensitivity curves can be measured with a reasonable accuracy. However, the overall luminosity curve is subjective, since it involves asking a test person whether two light sources have the same brightness, even if they are in completely different colors. Along the same lines, the relative magnitudes of the X, Y, and Z curves are arbitrary. Furthermore, one could define a valid color space with an X sensitivity curve that has twice the amplitude. This new color space would have a different shape. The sensitivity curves in the CIE 1931 and 1964 XYZ color spaces are scaled to have equal areas under the curves.