In 1931, the International Commission on Illumination (CIE)
defined three standard primaries, called X, Y
and Z. The corresponding functions , , and are called color-matching
functions. The color-matching function is defined to match the eye's
sensitivity to brightness; the other two do not correlate with any perceptual attibutes. X,
Y and Z represent the weights of the respective
color-matching functions needed to approximate a particular spectrum.

To match a color
with power distribution P, the amounts of the primaries are given by the following
formulae [1]:

where k for self-luminous bodies, such as CRT, is equal to 680 lumens per watt.

To transform from XYZ to RGB (with D65 white point), the matrix transform is used [3]:

The range for valid R, G, B values is [0,1]. Note, this matrix has
negative coefficients. Some XYZ color may transform to R, G, B values that are negative or
greater than one. This means that not all visible colors can be produced using the RGB
system.