Spectrum to RGB Conversion
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.
[ R ] [ 3.240479
-1.537150 -0.498535 ] [ X ] 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. |