sYCC | |
Long Name: | IEC 61966-2-1 Default YCC encoding transformation for a standard luma-chroma-chroma colour space |
Native Name Lang: | English |
Status: | Published |
Year Started: | 1996 |
Version: | 61966-2–1 Amend. 1 |
Version Date: | 2003 |
Committee: | /: TC 100/TA 2 |
Base Standards: | IEC 61966 Colour Measurement and Management in Multimedia Systems and Equipment |
Abbreviation: | sRGB |
Domain: | Color space, color model |
sYCC is a standard numerical encoding of colors, similar to the CIE YCbCr encoding, It uses three coordinates: a luma value
Y
Cb
Cr
N
Y
Cb
Cr
The space is defined by Annex F of the International Electrotechnical Commission (IEC) standard 61966-2-1 Amendment 1 (2003), as a linear transformation of the non-linear sRGB color space defined by the same document.
The official conversion from sYCC to sRGB may result in negative R, G, or B values; meaning that not all sYCC triplets represent colors that can be displayed on a computer screen, printed, or even perceived by the human eye.
The three unsigned integers
Y,Cb,Cr
Y',Cb',Cr'
Y'=Y/M
Cb'=(Cb-Z)/M
C'r=(Cb-Z)/M
M=2N-1
N
Z
2N-1
Y=round(MY'
Cb=round(Z+MCb')
Cr=round(Z+MCr')
0..M
In particular, for
N=8
M=255
Z=128
Y'
-128/255 ≈ -0.50196...
+127/255 ≈ +0.498039...
The standard specifies that these fractional values
Y',Cb',Cr'
R',G',B'
\begin{bmatrix}Y'\ Cb'\ Cr'\end{bmatrix} = \begin{bmatrix} +0.2990&+0.5870&+0.1140\\ -0.1687&-0.3313&+0.5000\\ +0.5000&-0.4817&-0.0813 \end{bmatrix} \begin{bmatrix}R'\ G'\ B'\end{bmatrix}
Y'
The non-linear fractional sRGB coordinates
R',G',B'
Y',Cb',Cr'
\begin{bmatrix}R'\ G'\ B'\end{bmatrix} = \begin{bmatrix} +1.0000&0.0000&+1.4020\\ +1.0000&-0.3441&-0.7141\\ +1.0000&+1.7720&0.0000 \end{bmatrix} \begin{bmatrix}Y'\ Cb'\ Cr'\end{bmatrix}
N=8
N=16
\begin{bmatrix}R'\ G'\ B'\end{bmatrix} = \begin{bmatrix} +1.000000&+0.000037&+1.401988\\ +1.000000&-0.344113&-0.714104\\ +1.000000&+1.771978&+0.000135 \end{bmatrix} \begin{bmatrix}Y'\ Cb'\ Cr'\end{bmatrix}
The same standard specifies the relation between the non-linear fractional coordinates
R',G',B'
R',G',B'
X,Y,Z
Since the linear transformation from sRGB to sYCC is defined in terms of non-linear (gamma-encoded) values (
R',G',B'
R,G,B
Y'
Y'
The integer encoded sYCC triplet
(0,0,0)
(255,0,0)
(Y,0,0)
Y
Note that the 8-bit integer sYCC triplet
(Y,Cb,Cr)=(0,255,255)
(Y',Cb',Cr') ≈ (0.0,0.5,0.5)
G' ≈ -0.5 x (0.3341+0.7141) ≈ -0.528
(0,0,0)
R' ≈ -0.701
B' ≈ -0.886