There are many color spaces in use for electronic media today. A very fine description of their interrelations may be found in the comp.graphics color space FAQ .
In component digital video, the color space is based on the fundamental luminance equation
Ey = 0.299Er + 0.587Eg + 0.114Ebwhich gives the luminance Ey in terms of the three primaries Er,Eg, and Eb. For CCIR-601, the two color components which are digitized are Cr = KCr*(Er-Ey) and Cb = KCb*(Eb-Ey). They are given by
Er-Ey = 0.701R - 0.587G - 0.114B Eb-Ey = -0.299R - 0.587G + 0.886BSince Y has unity range, and Er-Ey and Eb-Ey have ranges .701 to -.701 and .886 to -.886, they are renormalized by applying coefficents
KCr = .5/.701 = .713 and KCb = .5/.886 = .564which gives the renormalized color differences
ECr = 0.500R - 0.419G - 0.081B ECb = -0.169R - 0.331G + .500BSince we quantize Y to 220 levels with black at level 16, the decimal value of Y prior to quantization is
Y = 219(Ey) + 16where Ey is the 0-1 range continuous version, and Y is either the nearest integer ( 8-bit version ) or the fractional version with two bits of fractional value maintained ( 10-bit version ). Similarly, the color difference components are quantized to 225 levels with zero at level 128 which gives:
Cr = 160(Er-Ey) + 128 Cb = 126(Eb-Ey) + 128Often, the RGB components have the values 0-255, and the conversions used are:
Y = 0.257R + 0.504G + 0.098B + 16 Cr = 0.439R - 0.368G - 0.071B + 128 Cb = -0.148R - 0.291G + 0.439B + 128