Gernot Hoffmann
CIELab Color Space
4. Gamut Restrictions and Tests
10. Linear and Standard Nonlinear CIELab
Contents
1.1 Introduction
The gamut for any RGB color order system is a triangle in the CIE xyY chroma-
ticity diagram, here shown for the CIE primaries, the NTSC primaries and the Rec.
709 primaries which are also valid for sRGB and therefore for many PC monitors.
The white points are also different for all color order systems.
The CIE XYZ color space and its projection onto to the xy-plane, the CIE chro-
maticity diagram xyY, is often considered as perceptually not uniform. The colors
in the diagram below are anyway only illustrations, but it織s obvious that the green
area looks exaggerated.
The CIELab color space was intended for equal perceptual differences for equal
changes in the coordinates L*, a* and b* . Color differences deltaE are defined as
Euclidian distances in CIELab.
This document shows color charts for CIELab, referring to three color order systems.
The Rec.709 charts should look rather correct on an sRGB monitor.
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
x
1.0
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
y
Gamut of a standard screen
ITU-R BT.709 phosphors
700
620
650
610
600
580
570
550
540
520
510
500
490
480
470
380
Purple line
530
590
546.1
700.0
435.8
Gamut for CIE Primaries
Corners on the contour
Dominant
wavelength in
nanometers
Gamut for
NTSC Primaries
1.2 Introduction
CIELab uses new coordinates L*,a* and b*, by functions as described in the next
chapter. The true shape of the human gamut in CIELab is shown in chapter 11.
This results in huge areas for higher luminance.
The gamut triangle in xyY has to be replaced by a representation of a color cube
with corners R,G,B and Y(yellow),C,M. The gray axis is at a*=b*=0. Therefore the
area is confined by a distorted hexagon. A similar diagram can be found in [1]
Later it will be shown that the actual gamut, which depends on the luminance, is a
smaller area inside the hexagon.
Just to show the orientation together with the gamut triangle for the primaries we
proceed as follows:
Convert the contour points x,y for Y=1 into RGB . Divide R,G,B by the maximum
of R,G,B. Convert R,G,B to L*,a*,b*.
-250 -225 -200 -175 -150 -125 -100 -75 -50 -25 0
25 50 75 100 125 150 175 200 225
-250 -225 -200 -175 -150 -125 -100 -75 -50 -25 0
25 50 75 100 125 150 175 200 225 250
-250
-225
-200
-175
-150
-125
-100
-75
-50
-25
0
25
50
75
100
125
150
175
200
225
-250
-225
-200
-175
-150
-125
-100
-75
-50
-25
0
25
50
75
100
125
150
175
200
225
250
a*
b*
Gamut
CIE primaries
WP Eq.Energy
Contour for
R-Y-G-C-B-M-R
hexagon
Outer blue area
human gamut
Red
Green
Blue
2.1 Formulas
Generic gamma correction, G= 2.2, C=R,G,B
sRGB gamma co
C
C
G
=
rrrection, C=R,G,B
C
C
i f C
C
=
瞿
+
/
.
.
(( .
) / .
)
12 92
0 03928
0 055
1 055
2
2 4
.
else
xr
繡
=
RGB to XYZ ( same white point D65)
RGB t
X
C R
o
o XYZ (new white point D50, Bradford correction)
XY
X
BC R
=
xr
Z
Z to L*a*b* (reference white
n
X
)
X
X
X
Y
Y
Y
Z
Z
Z
X
X
n
n
n
1
1
1
1
1
1
=
=
=
=
3
3
1
1
1
1
1 3
1
0 008856
7 787
16 116
0 008856
i f X
X
else
Y
Y
i f Y
>
+
繡
=
>
.
.
.
7
7 787
16 116
0 008856
7 787
16 116
1
1
1
1 3
1
1
.
.
.
Y
else
Z
Z
i f Z
Z
e
+
繡
=
>
+
llse
L
Y
a
X
Y
b
Y
Z
繡
=
-
=
-
=
-
*
*
(
)
*
(
)
116
16
500
200
1
1
1
1
1
From RGB to CIELab
RGB are nonlinearly distorted luminance values for each channel in physical
tristimulus systems like CIE,NTSC or working spaces like sRGB or Adobe RGB(98).
RGB are undistorted values which are linearly related to CIE XYZ.
Each RGB system has a White Point(w). The transformation to CieLab can include
a Reference White Point (n) which is either (w) or D50.
Issues of adaptation are taken into account by the Bradford correction.
For CIE and NTSC we use the same White Point in RGB and CIELab.
For sRGB we use D50 in CIELab and additionally the Bradford corrrection (p. 9).
2.2 Formulas
From CIELab to RGB
L*a*b* to XYZ
Y
L
X
a
Y
Z
b
Y
X
X
1
1
1
1
1
1
1
3
16 116
500
200
=
+
=
+
= -
+
=
( *
) /
* /
* /
iif X
X
else
Y
Y
if Y
1
1
1
1
3
1
0 206893
16 116 7 787
0 20689
>
-
繡
=
>
.
(
) / .
.
3
3
16 116 7 787
0 206893
16 116
1
1
1
3
1
1
(
) / .
.
(
) /
Y
else
Z
Z
if Z
Z
-
繡
=
>
-
7
7 787
1
1
1
.
else
X
X X
Y
Y Y
Z
Z Z
n
n
n
繡
=
=
=
XYZ to RGB ( same white po
oint D50)
XYZ to RGB (new white point D65, Br
R
C X
C X
=
=
-
rx
xr
1
a
adford correction)
Generic gamma correc
R
BC
X
C B X
=
=
-
-
(
)
xr
rx
1
1
ttion, G = 2.2, C = R,G,B
sRGB gamma correction, C= R,
C
C
G
=
1/
G
G,B
C
C
i f C
C
else
=
瞿
-
繡
12 92
0 00304
1 055
0 055
1 2 4
.
.
.
.
/ .
Please refer to explanations on the previous page.
A value RGB is out of gamut if any of the values is less than 0 or greater than 1
(normalized values).
2.3 Formulas
The CIE chromaticity diagram is called xyY. The threedimensional space is called
XYZ.
xyY to XYZ
XYZ to xyY
z
x
y
X
Y x y
Z
Y z y
D
X
Y
Z
x
X D
y
Y D
=
-
-
=
=
=
+
+
=
=
1
/
/
/
/
z
z
Z D
=
/
Some important numbers
3
0 008856
0 2068930
16 116
0 137931
116
.
.
/
.
=
=
0
0 008856
16
903 3 0 008856
8 0
1 3
.
.
.
.
-
=
=
From xyY to XYZ
2.4 Formulas
The conversion from XYZ to L*a*b* consists essentially of four steps:
1. White point correction
2. Nonlinear distortion of the variables X,Y, Z by a cubic root
3. Linear transformation into a new vector basis A,B,L
4. Scaling
With some obvious simplifications the linear part can be written by matrices:
A is in X-direction, B in negative Z-direction and L along the diagonal in XYZ.
A, B and L are normalized substitutes for a*, b* and L*.
Z
X,A
Y
B
L
A
B
L
X
Y
Z
X
Y
Z
=
-
-
=
1
1
0
0
1
1
0
1
0
1
0
1
0
0
0
1
0
1
1
-
A
B
L
2.5 Formulas
Matrices for Primaries and White Point [3]
X
Y
Z
R
G
B
R
G
B
X
Y
Z
D
x
xr
r x
r
=
=
=
-
C
C
(
x
x
y
y
y
y
x
x
U
x
x
y
y
y
y
x
x
V
b
g
b
r
b
g
b
w
b
g
b
w
b
g
b
)(
) (
)(
)
(
)(
) (
)(
)
-
-
-
-
=
-
-
-
-
-
=
=
-
-
-
-
-
=
=
=
-
-
=
(
)(
) (
)(
)
/
/
/
x
x
y
y
y
y
x
x
u
U D
v
V D
w
u
v
u x y
r
b
w
b
r
b
w
b
r
w
1
C
xr
v
v x
y
w x
y
u y y
v y
y
w y
y
u z y
v z
y
w z
y
g
w
b
w
r
w
g
w
b
w
r
w
g
w
b
w
/
/
/
/
/
/
/
/
=
=
-
C
C
r x
xr
xr ik
ik
In the next formulas use c
for c
1
11
22
D
c
c
(
c
c
c
c
c
c
c
c
c
c
c c
c
c
c
c
rx
33
23
32
12
21
33
23
31
13
21 32
22
31
11
-
-
-
+
-
=
)
(
)
(
)
(
2
22
33
23
32
12
12
33
13
32
13
12
23
13
2
c
c
c
D
c
c
c
c
c
D
c
c
c
c
c
rx
rx
-
=
-
=
-
) /
(
) /
(
2
2
21
21
33
23
31
22
11
33
13
31
23
) /
(
) /
(
) /
(
D
c
c
c
c
c
D
c
c
c
c
c
D
c
rx
rx
rx
=
-
=
-
=
c
c
c
c
c
D
c
c
c
c
c
D
c
c
c
c
c
rx
rx
11
23
13
21
31
21
32
22
31
32
11
32
12
-
=
-
=
-
) /
(
) /
(
3
31
33
11
22
12
21
) /
(
) /
D
c
c
c
c
c
D
rx
=
-
3.1 Primaries and Matrices
x
r
y
r
x
g
y
g
x
b
y
b
0.73467 0.26533 0.27376 0.71741 0.16658 0.00886
x
w
y
w
X
w
Y
w
Z
w
0.33333 0.33333
1
1
1
Matrix
X
=
C
xr
R
Matrix
R
=
C
rx
X
0.4900
0.3100
0.2000
2.3647
-0.8966 -0.4681
0.1770
0.8124
0.0106
- 0.5152
1.4264 0.0887
0.0000
0.0100
0.9900
0.0052
-0.0144 1.0092
x
r
y
r
x
g
y
g
x
b
y
b
0.6700
0.3300
0.2100
0.7100
0.1400
0.0800
x
w
y
w
X
w
Y
w
Z
w
0.3100
0.3160
0.9810
1
1.1835
Matrix
X
=
C
xr
R
Matrix
R
=
C
rx
X
0.6070
0.1734
0.2006
1.9097
-0.5324 -0.2882
0.2990
0.5864
0.1146
- 0.9850
1.9998 -0.0283
0.0000
0.0661
1.1175
0.0582
-0.1182 0.8966
x
r
y
r
x
g
y
g
x
b
y
b
0.6400
0.3300
0.3000
0.6000
0.1500
0.0600
x
w
y
w
X
w
Y
w
Z
w
0.3127
0.3290
0.9505
1
1.0891
Matrix
X
=
C
xr
R
Matrix
R
=
C
rx
X
0.4124
0.3576
0.1805
3.2410
-1.5374 -0.4986
0.2126
0.7152
0.0722
- 0.9692
1.8760 0.0416
0.0193
0.1192
0.9505
0.0556
-0.2040 1.0570
Rec.709 Primaries and D65 Whitepoint (sRGB)
NTSC Primaries and NTSC Whitepoint
CIE Primaries and Equi-Energy Whitepoint
Matrix
B
1.0479 0.0229
-0.0502
0.0296 0.9904
-0.0171
-0.0092 0.0151
0.7519
Bradford Matrix for D65 / D50
Matrix
B
-1
0.9555 -0.0231 0.0633
-0.0283 1.0100 0.0211
0.0123 -0.0206 1.3303
This are the coordinates of the Primaries and the White Point in CIE XYZ for
several cases (minor deviations to [1],[2] because of PostScript matrix inversion).
3.2 Primaries and Matrices
Mostly it織s assumed that all colors inside the gamut triangle can be shown by the
respective device. Actually the gamut in CIELab is not the triangle R-G-B but the
hexagon R-Y-G-C-B-M-R. We have to choose an interpolation path which shows
also fully saturated yellow, cyan and magenta.
In the next diagrams we can see color patches which are out of gamut, though they
are inside the hexagon. The gamut in the chromaticity diagram is the projection of
all available colors in XYZ onto xyY, ignoring the spacial distribution in XYZ.
The available gamut depends strongly on the luminance Y. E.g. for Y=1 we get
white by R=1, G=1 and B=1 and all other colors are out of gamut.
A color is considered as out of gamut if at least one value of R,G,B is larger than
one or smaller than zero. The values are clipped for these limits then.
Such a color is usually shown by the device reasonably, though slightly wrong.
4. Gamut Restrictions and Tests
Prims
White
Y Xr
Zr
Xg
Zg
Xb
Zb
Xw
Zw
CIE
EquiE
1.0000
2.7688
0.0000
0.3815
0.0123
18.8013 93.0654
1.0000
1.0003
CIE
D50
1.0000
2.7688
0.0000
0.3815
0.0123
18.8013 93.0654
0.9642
0.8251
CIE
D65
1.0000
2.7688
0.0000
0.3815
0.0123
18.8013 93.0654
0.9504
1.0890
CIE
9300K
1.0000
2.7688
0.0000
0.3815
0.0123
18.8013 93.0654
0.9714
1.4287
NTSC
NTSC
1.0000
2.0303
0.0000
0.2957
0.1126
1.7500
9.7500
0.9810
1.1835
NTSC
D50
1.0000
2.0303
0.0000
0.2957
0.1126
1.7500
9.7500
0.9642
0.8251
NTSC
D65
1.0000
2.0303
0.0000
0.2957
0.1126
1.7500
9.7500
0.9504
1.0890
NTSC
9300K
1.0000
2.0303
0.0000
0.2957
0.1126
1.7500
9.7500
0.9714
1.4287
709
D50
1.0000
1.9393
0.0909
0.5000
0.1666
2.5000 13.1666
0.9642
0.8251
709
D65
1.0000
1.9393
0.0909
0.5000
0.1666
2.5000 13.1666
0.9504
1.0890
709
9300K
1.0000
1.9393
0.0909
0.5000
0.1666
2.5000 13.1666
0.9714
1.4287
The sRGB color charts were tested by Photoshop 6.
E.g. the chart sRGB-050 for L*=50. Select sRGB as working space and Rendering
Intent Relative Colorimetric . Open document in RGB mode. Place page of PDF.
Indicate CIELab values by info palette.
The nomenclature according to [8] is confusing:
Media-Relative = CIE Absolute
ICC-Absolute
= CIE Relative
Photoshop Relative Colorimetric seems to mean ICC Media-Relative Colorimetric.
5. Inverse Gamma Correction
Black
C=C織
2.2
Red
sRGB
Green
Ten times the difference
RGB values are transformed into nonlinear values R織G織B織 by C織=C
1/2.2
for CIE
and NTSC primaries. This is a compensation for calibrated monitors.
sRGB differs slightly from Gamma =2.2, because the transfer function is composed
of a linear part and a Gamma =2.4 part.
C織 =
1.055 C
1/2.4
- 0.055
if C > 0.00304
C織 = 12.92 C
else
The maximal difference is less than 1% full scale.
The diagram shows the Gamma corrections, instead of the inverse corrections.
According to profile informations, NTSC and CIE-RGB seems to use the simple
Gamma correction without linear part. Consequently we don織t apply the sRGB
formula here.
6. CIE L*=50
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 50
CIE primaries
White
Eq.Energy
Reference Eq.Energy
Bradford no
Gamma
2.2
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
The illustrations are made by PostScript EPS programs as vector graphics.
Converted to PDF by Acrobat Distiller they are still vector graphics
Eventually the appearance can be improved by Smooth Line Art = Off
7. NTSC L*= 50
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 50
NTSC primaries
White
NTSC
Reference NTSC
Bradford no
Gamma
2.2
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
8.1 Rec.709 (sRGB) L*=1
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 1
709 primaries
White
D65
Reference D50
Bradford yes
Gamma
sRGB
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
8.2 Rec.709 (sRGB) L*=10
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 10
709 primaries
White
D65
Reference D50
Bradford yes
Gamma
sRGB
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
8.3 Rec.709 (sRGB) L*=20
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 20
709 primaries
White
D65
Reference D50
Bradford yes
Gamma
sRGB
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
8.4 Rec.709 (sRGB) L*=30
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 30
709 primaries
White
D65
Reference D50
Bradford yes
Gamma
sRGB
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
8.5 Rec.709 (sRGB) L*=40
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 40
709 primaries
White
D65
Reference D50
Bradford yes
Gamma
sRGB
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
8.6 Rec.709 (sRGB) L*=50
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 50
709 primaries
White
D65
Reference D50
Bradford yes
Gamma
sRGB
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
8.7 Rec.709 (sRGB) L*=60
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 60
709 primaries
White
D65
Reference D50
Bradford yes
Gamma
sRGB
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
8.8 Rec.709 (sRGB) L*=70
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 70
709 primaries
White
D65
Reference D50
Bradford yes
Gamma
sRGB
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
8.9 Rec.709 (sRGB) L*=80
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 80
709 primaries
White
D65
Reference D50
Bradford yes
Gamma
sRGB
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
8.10 Rec.709 (sRGB) L*=90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 90
709 primaries
White
D65
Reference D50
Bradford yes
Gamma
sRGB
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
8.11 Rec.709 (sRGB) L*=99
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 99
709 primaries
White
D65
Reference D50
Bradford yes
Gamma
sRGB
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
a*
b*
a*
b*
a*
b*
9.1 3D Views for three RGB-Spaces
CIE
NTSC
Rec. 709
a*b* axes
-100 /100
L* 1/ 99
No artefacts:
Smooth Line Art
Off
a*
b*
L*
a*
b*
L*
a*
b*
L*
a*
b*
L*
a*
b*
L*
a*
b*
L*
a*
b*
L*
a*
b*
L*
9.2 3D Views, Rotated, for Rec.709
Volumes and Wireframes use smoothed height contours
a*b* axes
-100 /100
L* 0/ 100
Rec.709
a*
b*
a*
b*
10. Linear and Standard Nonlinear CIELab
Rec. 709
Linear
a*b* axes
-100 /100
L* 0 / 95
Rec. 709
Nonlinear
The bottom image shows the same 3D view for the Rec.709 color system as on the
previous page. The top image shows a linear transformation, as in chapter 2.2:
L* = 100 Y /Y
n
a* = 500 (X/X
n
- Y/Y
n
)
b* = 200 (Y/ Y
n
- Z/Z
n
)
Here we can see that the colors are too light for low luminance. This is the reason
for the introduction of the nonlinear CIELab conversion, though the cubic root law
is also not perfect. The volume looks like a distorted HLS double cone.
a*
b*
L*
a*
b*
L*
a*
b*
L*
11. Human Gamut in CIELab
The human gamut in CIELab is a cone with the apex at the origin of the coordinate
system. A threedimensional illustration can be found in [2] as well.
Here we see three cross sections at L*= 0.2, 0.4 and 0.6. The axes a* and b* are
drawn with lengths 簣 200.
12. Small Differences for Rec.709 (sRGB) L*=50
-20 -18 -16 -14 -12 -10 -8
-6
-4
-2
0
2
4
6
8
10 12 14 16 18
-20 -18 -16 -14 -12 -10 -8
-6
-4
-2
0
2
4
6
8
10 12 14 16 18 20
-20
-18
-16
-14
-12
-10
-8
-6
-4
-2
0
2
4
6
8
10
12
14
16
18
-20
-18
-16
-14
-12
-10
-8
-6
-4
-2
0
2
4
6
8
10
12
14
16
18
20
a*
b*
L* = 50
709 primaries
White
D65
Reference D50
Bradford yes
Gamma
sRGB
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
13. Rec.709 (sRGB) L*=50 with RGB Numbers
4
5
0
152
255
0
149
255
0
146
255
0
143
255
0
140
255
0
136
255
0
132
255
0
127
255
0
122
255
0
116
255
0
109
255
51
100
255
94
91
255
122
79
255
145
63
255
165
40
255
184
0
255
3
5
0
151
255
0
148
255
0
145
255
0
142
255
0
139
255
0
135
255
0
131
255
0
126
255
0
120
255
0
114
255
45
107
255
89
99
255
117
89
255
140
77
255
160
60
255
178
35
255
195
0
255
2
5
0
150
255
0
147
255
0
144
255
0
141
255
0
138
255
0
134
255
0
130
255
0
125
255
0
119
255
34
113
255
83
106
255
111
97
255
134
87
255
154
75
255
172
58
255
188
29
255
204
0
255
9
0
149
239
0
146
239
0
144
239
0
140
239
0
137
239
0
133
240
0
129
240
0
124
240
16
118
240
75
112
240
105
104
240
127
96
241
147
85
241
165
73
241
181
55
241
197
23
242
212
0
242
0
0
148
221
0
146
221
0
143
221
0
140
222
0
136
222
0
132
222
0
128
222
0
123
222
66
117
222
97
111
223
120
103
223
140
94
223
158
84
223
174
71
223
190
52
224
205
17
224
219
0
224
0
3
0
147
203
0
145
204
0
142
204
0
139
204
0
135
204
0
131
204
0
127
204
54
122
205
88
116
205
112
110
205
132
102
205
150
93
205
167
83
206
182
69
206
197
50
206
211
8
207
225
0
207
9
6
0
147
186
0
144
186
0
141
186
0
138
186
0
135
187
0
131
187
36
126
187
77
121
187
103
115
187
124
109
188
142
101
188
158
92
188
174
81
188
189
67
189
203
48
189
216
0
190
230
0
190
9
8
0
146
169
0
144
169
0
141
169
0
138
169
0
134
169
0
130
169
64
126
170
93
120
170
114
115
170
133
108
170
150
100
171
165
91
171
180
80
171
194
66
172
208
46
172
221
0
173
234
0
173
8
0
146
151
0
143
151
0
140
152
0
137
152
0
134
152
47
130
152
80
125
153
104
120
153
123
114
153
140
107
153
156
100
154
171
90
154
185
79
155
199
65
155
212
44
155
225
0
156
237
0
156
8
4
0
145
134
0
143
134
0
140
134
0
137
135
15
133
135
65
129
135
92
125
136
112
119
136
130
113
136
146
107
137
161
99
137
176
90
137
189
78
138
203
64
138
215
42
139
228
0
139
241
0
140
7
6
0
145
117
0
143
117
0
140
117
0
136
117
45
133
118
77
129
118
100
124
119
119
119
119
136
113
119
151
106
120
166
98
120
180
89
121
193
78
121
206
63
122
218
41
122
231
0
123
243
0
124
7
0
145
99
0
142
100
0
139
100
0
136
100
59
132
101
86
128
101
106
124
101
124
119
102
140
113
102
155
106
103
169
98
104
183
89
104
196
77
105
208
62
105
221
39
106
233
0
107
245
0
108
7
0
145
81
0
142
82
0
139
82
31
136
83
69
132
83
92
128
84
111
123
84
128
118
85
144
112
85
158
105
86
172
98
87
185
88
87
198
77
88
211
61
89
223
38
90
235
0
91
247
0
92
7
0
144
62
0
142
63
0
139
63
44
136
64
75
132
65
97
128
65
115
123
66
132
118
67
147
112
68
161
105
69
174
97
69
187
88
70
200
76
71
212
61
73
225
37
74
237
0
75
248
0
76
7
0
144
40
0
142
41
0
139
42
53
135
43
80
132
44
101
128
45
118
123
46
134
118
47
149
112
49
163
105
50
176
97
51
189
87
53
201
76
54
214
60
55
226
36
57
238
0
58
249
0
60
6
0
144
3
0
142
6
2
139
9
58
135
12
83
132
15
103
128
17
120
123
20
136
118
22
150
112
25
164
105
27
177
97
30
190
87
32
202
75
34
215
60
37
227
36
39
239
0
41
250
0
43
6
0
144
0
0
141
0
18
138
0
62
135
0
86
132
0
105
127
0
122
123
0
137
118
0
151
112
0
165
105
0
178
97
0
191
87
0
203
75
4
215
60
10
227
35
16
239
0
20
251
0
25
6
0
144
0
0
141
0
25
138
0
64
135
0
87
131
0
106
127
0
123
123
0
138
117
0
152
111
0
166
105
0
179
97
0
191
87
0
204
75
0
216
60
0
228
35
0
240
0
0
251
0
0
6
0
144
0
0
141
0
29
138
0
66
135
0
89
131
0
107
127
0
124
123
0
139
117
0
153
111
0
166
105
0
179
96
0
192
87
0
204
75
0
216
59
0
228
35
0
240
0
0
252
0
0
6
0
144
0
0
141
0
32
138
0
67
135
0
90
131
0
108
127
0
124
123
0
139
117
0
153
111
0
167
104
0
180
96
0
192
87
0
205
75
0
217
59
0
229
35
0
240
0
0
252
0
0
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0
10 20 30 40 50 60 70 80 90 100
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
10
20
30
40
50
60
70
80
90
100
a*
b*
L* = 50
709 primaries
White
D65
Reference D50
Bradford yes
Gamma
sRGB
Dot mark for
out of gamut
Clipping for
R-Y-G-C-B-M
hexagon
Outer blue area
human gamut
14.1 PostScript Kernels
/c0 1 3 div def
/c1 0.008856 def
/c2 7.787 def
/c3 16 116 div def
/c4 0.206893 def
/BM11 1.0479 def /BM12 0.0229 def /BM13 -0.0502 def
/BM21 0.0296 def /BM22 0.9904 def /BM23 -0.0171 def
/BM31 -0.0092 def /BM32 0.0151 def /BM33 0.7519 def
/PrimsCie
{/txtP (CIE primaries) def
/xr 0.73467 def /yr 0.26533 def
/xg 0.27376 def /yg 0.71741 def
/xb 0.16658 def /yb 0.00886 def
} def
/Prims709
{/txtP (709 primaries) def
/xr 0.64000 def /yr 0.33000 def
/xg 0.30000 def /yg 0.60000 def
/xb 0.15000 def /yb 0.06000 def
} def
/PrimsNTSC
{/txtP (NTSC primaries) def
/xr 0.67000 def /yr 0.33000 def
/xg 0.21000 def /yg 0.71000 def
/xb 0.14000 def /yb 0.08000 def
} def
/WhiteEqE
{/xw 0.3333 def /yw 0.3333 def
/txtW (Eq.Energy ) def
} def
/WhiteD65
{/xw 0.3127 def /yw 0.3290 def
/txtW (D65) def
} def
/WhiteNTSC
{/xw 0.3100 def /yw 0.3160 def
/txtW (NTSC) def
} def
/White3000K % R.W.G.Hunt, Measuring Colours
{/xw 0.4368 def /yw 0.4041 def
/txtW (3000K) def
} def
/White4000K
{/xw 0.3804 def /yw 0.3767 def
/txtW (4000K) def
} def
/White5000K
{/xw 0.3457 def /yw 0.3585 def
/txtW (5000K) def
} def
/White6000K
{/xw 0.3220 def /yw 0.3318 def
/txtW (6000K) def
} def
/White7000K
{/xw 0.3063 def /yw 0.3165 def
/txtW (7000K) def
} def
/White8000K
{/xw 0.2952 def /yw 0.3048 def
/txtW (8000K) def
} def
/White9300K
{/xw 0.2857 def /yw 0.2941 def % Wyszecki+Stiles interpolated
/txtW (9300K) def
} def
/RefEqE
{/xn 0.3333 def /yn 0.3333 def
/txtN (Eq.Energy ) def
} def
/RefD65
{/xn 0.3127 def /yn 0.3290 def
/txtN (D65) def
} def
/RefNTSC
{/xn 0.3100 def /yn 0.3160 def
/txtN (NTSC) def
} def
/RefD50
{/xn 0.3457 def /yn 0.3585 def
/txtN (D50) def
} def
/PrimToMat
{ % matrix CR for XYZ(WP)=CR*RGB(WP)
/zr 1 xr sub yr sub def
/zg 1 xg sub yg sub def
/zb 1 xb sub yb sub def
/zw 1 xw sub yw sub def
/zn 1 xn sub yn sub def
/D xr xb sub yg yb sub mul yr yb sub xg xb sub mul sub def
/U xw xb sub yg yb sub mul yw yb sub xg xb sub mul sub def
/V xr xb sub yw yb sub mul yr yb sub xw xb sub mul sub def
/u U D div def
/v V D div def
/w 1 u sub v sub def
% XYZ(WP)=CR(WP)*RGB(WP)
/CR11 u xr mul yw div def /CR12 v xg mul yw div def /CR13 w xb mul yw div def
/CR21 u yr mul yw div def /CR22 v yg mul yw div def /CR23 w yb mul yw div def
/CR31 u zr mul yw div def /CR32 v zg mul yw div def /CR33 w zb mul yw div def
% Bradford matrix XYZ(D50)=BM*XYZ(D65) Actual definition in main program
% XYZ(D50)=BM*XYZ(D65)=BM*CR(D65)*RGB(D65)=XR(D50)*RGB(D65)
Brad
{% XR(D50)=BM*CR(D65)
/XR11 BM11 CR11 mul BM12 CR21 mul add BM13 CR31 mul add def
/XR12 BM11 CR12 mul BM12 CR22 mul add BM13 CR32 mul add def
/XR13 BM11 CR13 mul BM12 CR23 mul add BM13 CR33 mul add def
/XR21 BM21 CR11 mul BM22 CR21 mul add BM23 CR31 mul add def
/XR22 BM21 CR12 mul BM22 CR22 mul add BM23 CR32 mul add def
/XR23 BM21 CR13 mul BM22 CR23 mul add BM23 CR33 mul add def
/XR31 BM31 CR11 mul BM32 CR21 mul add BM33 CR31 mul add def
/XR32 BM31 CR12 mul BM32 CR22 mul add BM33 CR32 mul add def
/XR33 BM31 CR13 mul BM32 CR23 mul add BM33 CR33 mul add def }
{% XR(D65)=CR(D65)
/XR11 CR11 def /XR12 CR12 def /XR13 CR13 def
/XR21 CR21 def /XR22 CR22 def /XR23 CR23 def
/XR31 CR31 def /XR32 CR32 def /XR33 CR33 def } ifelse
% Inverse of XR
/D XR22 XR33 mul XR23 XR32 mul sub XR11 mul
XR21 XR33 mul XR23 XR31 mul sub XR12 mul sub
XR21 XR32 mul XR22 XR31 mul sub XR13 mul add def
/RX11 XR22 XR33 mul XR23 XR32 mul sub D div def
/RX12 XR12 XR33 mul XR13 XR32 mul sub D div neg def
/RX13 XR12 XR23 mul XR13 XR22 mul sub D div def
/RX21 XR21 XR33 mul XR23 XR31 mul sub D div neg def
/RX22 XR11 XR33 mul XR13 XR31 mul sub D div def
/RX23 XR11 XR23 mul XR13 XR21 mul sub D div neg def
/RX31 XR21 XR32 mul XR22 XR31 mul sub D div def
/RX32 XR11 XR32 mul XR12 XR31 mul sub D div neg def
/RX33 XR11 XR22 mul XR12 XR21 mul sub D div def
/Yw 1 def
/Xw xw yw div Yw mul def
/Zw zw yw div Yw mul def
/Yn 1 def
/Xn xn yn div Yn mul def
/Zn zn yn div Yn mul def
} bind def
14.2 PostScript Kernels
/LABtoRGB
{ /Y1 L* 0.16 add 1.16 div def
/X1 a* 5.0 div Y1 add def
/Z1 Y1 b* 2.0 div sub def
/X X1 c4 le {X1 c3 sub c2 div }{ X1 3 exp } ifelse Xn mul def
/Y Y1 c4 le {Y1 c3 sub c2 div }{ Y1 3 exp } ifelse Yn mul def
/Z Z1 c4 le {Z1 c3 sub c2 div }{ Z1 3 exp } ifelse Zn mul def
/R X RX11 mul Y RX12 mul add Z RX13 mul add def
/G X RX21 mul Y RX22 mul add Z RX23 mul add def
/B X RX31 mul Y RX32 mul add Z RX33 mul add def
} bind def
/RGBtoLAB
{%/c0 1 3 div def Actual definition in main program
%/c1 0.008856 def
%/c2 7.787 def
%/c3 16 116 div def
%/c4 0.206893 def
/X R XR11 mul G XR12 mul add B XR13 mul add def
/Y R XR21 mul G XR22 mul add B XR23 mul add def
/Z R XR31 mul G XR32 mul add B XR33 mul add def
/X1 X Xn div dup c1 le { c2 mul c3 add }{ c0 exp } ifelse def
/Y1 Y Yn div dup c1 le { c2 mul c3 add }{ c0 exp } ifelse def
/Z1 Z Zn div dup c1 le { c2 mul c3 add }{ c0 exp } ifelse def
/a* X1 Y1 sub 5.0 mul def
/b* Y1 Z1 sub 2.0 mul def
/ga* a* 1.05 add 100 mm mul def
/gb* b* 1.05 add 100 mm mul def
} bind def
/IGamma
{ /iga 1 gam div def
/og false def % out of gamut
R 0 lt { /R 0 def /og true def } if
G 0 lt { /G 0 def /og true def } if
B 0 lt { /B 0 def /og true def } if
R 1 gt { /R 1 def /og true def } if
G 1 gt { /G 1 def /og true def } if
B 1 gt { /B 1 def /og true def } if
gam 2.4 ne
{/R R iga exp def
/G G iga exp def
/B B iga exp def }
{/R R dup 0.00304 lt {12.92 mul }{iga exp 1.055 mul 0.055 sub } ifelse def
/G G dup 0.00304 lt {12.92 mul }{iga exp 1.055 mul 0.055 sub } ifelse def
/B B dup 0.00304 lt {12.92 mul }{iga exp 1.055 mul 0.055 sub } ifelse def } ifelse
R G B setrgbcolor
} bind def
/xyYtoLAB
% input x,y,Y
{ /z 1 x sub y sub def
/X x y div Y mul def
/Z z y div Y mul def
/R X RX11 mul Y RX12 mul add Z RX13 mul add def
/G X RX21 mul Y RX22 mul add Z RX23 mul add def
/B X RX31 mul Y RX32 mul add Z RX33 mul add def
/max R def
G max gt {/max G def } if
B max gt {/max B def } if
/R R max div def
/G G max div def
/B B max div def
RGBtoLAB
} bind def
14.3 PostScript Kernels
15. References
[1]
R.W.G.Hunt
Measuring Colour
Fountain Press England
1998
[2]
G.Wyszecki + W.S.Stiles
Color Science
John Wiley & Sons, New York ,..., 1982
[3]
References for Color Science
http://www.fho-emden.de/~hoffmann/colcie290800.pdf
[4]
References for PostScript
http://www.fho-emden.de/~hoffmann/pstutor22112002.pdf
Everything about Color and Computers
http://www.efg2.com
[7]
International Color Consortium
http://www.color.org
[8]