Technical Note Colour 2024
Technical Note Colour 2024
Contents
1. Colour .......................................................................................................................................................................... 2
2. The photopic luminosity function ............................................................................................................................... 2
3. Wright and Guild's colour matching experiments ....................................................................................................... 4
4. CIE XYZ colour space .................................................................................................................................................... 6
5. CIE colour matching functions ..................................................................................................................................... 7
6. sRGB colour space and Planckian locus ....................................................................................................................... 8
7. Rendering of the colour spectrum in the sRGB colour space .................................................................................... 10
8. Summary ................................................................................................................................................................... 12
1. Colour
The word "colour" is associated with the human perception of the visible light spectrum which covers the range of
electromagnetic wavelengths from around 380 nm to about 740 nm. Admittedly, this is a somewhat rather abrupt approach
to the notion of colours. Instead, we can tackle the subject starting from an experience that everyone is familiar with: Colour
is most intuitively associated with the additive combination of the primary colours red, green and blue (RGB model). More
technically, in terms that should sound for those familiar with image editing softwares, colour can be described in terms of
hue, saturation, and lightness (HSL), which is an alternative representation of the RGB model. The hue value is associated
with the dominant wavelength of a colour (e.g., red, orange, yellow, green, cyan, blue, indigo, violet for spectral colours) or
with the complementary wavelength for non-spectral colours (purple colours obtained by the combination of red and blue
primaries). Saturation provides the degree of purity of a colour, i.e. whether it appears pale or deeply saturated. Finally,
lightness quantifies the intensity of a colour in terms of darkness/lightness.
All these notions may seem rather abstract without illustrations. Fortunately, they are admirably brought together in the CIE
chromaticity diagram which we will discuss in this document. Before getting into the heart of the topic, we shall first briefly
introduce the photopic luminosity function (section 2) – the fundamental function of photometry science – because it is
needed for the construction of the CIE chromaticity diagram.
For the sake of brevity, several complex technical concepts will be covered only succinctly in this document.
In this equation, e, is the spectral flux, or radiant flux per unit wavelength. The constant K cd is defined in the SI standard
(International System of Units) as follows: The luminous efficacy of monochromatic radiation of frequency 540 × 1012 Hz, Kcd,
is 683 lm/W. This frequency corresponds to the wavelength 555.17 nm (peak of sensitivity of the eye in day vision), as
0.8
0.6
V (λ)
0.4
0.2
0
380 420 460 500 540 580 620 660 700 740 780
Wavelength, λ (nm)
Figure 1: The 2° standard observer spectral luminous efficiency function for photopic vision, CIE 1924 V(λ) function.
calculated from the speed of light in vacuum, c = 299 792 458 m/s. It is noteworthy that the integration is only carried out
over the wavelengths for which V(λ) 0. Since V(λ) is given by a table of empirical values (see Figure 1 and Table 1), it is best
to complete the integration numerically. The typical range for this calculation is 380 nm λ 740 nm.
This short incursion into photometry highlights the fundamental role played by V(λ). We will not discuss photometry further
as it falls outside the scope of this technical note. The interested readers can find details on this topic in the Technical Guide
"A general guide to high-efficiency LED exposure systems" released by idonus in 2019 (DOI: 10.13140/RG.2.2.29958.32323).
We also temporarily leave the photopic function V(λ), to which we will return in section 5.
In short, observers were asked to match monochromatic lights by mixing three primary-colour lights. Using the data collected
from only 17 observers (10 for Wright and 7 for Guild), Wright and Guild could quantitatively measure how the
monochromatic colours of the spectrum can be reproduced when beams of red, green, and blue light are added. The
combination of their data, gathered by Guild in 1931, forms the basis of the CIE colour matching functions that are still in use
in today's colorimetry science. Below, we describe the basic parts of Guild's experimental setup. The main difference from
Wright's experiments lied in the wavelengths chosen for the primaries.
• Monochromator – The source of light (reference white) was a 40-watt automobile headlight lamp, the filament of
which was focused by means of an achromatic lens and a prism on the slit of a constant deviation monochromator.
• Primaries – The 3 primaries were obtained by passing the light from an opal-bulb gas-filled lamp through red, green,
and blue gelatine filters. The wavelength chosen for these primaries were 700 nm (red), 546.1 nm (green), and
435.8 nm (blue). The choice of very specific wavelengths for green and blue lied in the availability of filters specially
designed to isolate these spectral lines prominent in mercury. As for the red stimulus, because the hue was found
to be constant for wavelengths higher than about 670 nm, a convenient procedure was to use a very deep red filter.
• Trichromatic colorimeter – The observer was facing a square field of view divided into two rectangular portions by
a horizontal line. The size of the aperture was such that the square subtended an angle of approximately 2° at the
observer's eye (hence, the name "2-degree standard observer"). The test field contained the monochromatic colour
to be matched. The other, the matching field, contained a blend of the primaries which could be adjusted by means
of three control handles, their amounts being measured on graduations attached to the shutters. If a test colour
couldn't be matched, the observer could instead introduce one of the primaries into the test field (i.e., subtracted).
With this system, any monochromatic colour (Cλ) could be uniquely represented by a colour equation of the form:
𝐶𝜆 = 𝑟𝑅 + 𝑔𝐺 + 𝑏𝐵, 𝑟 + 𝑔 + 𝑏 = 1,
where r, g, and b are the trichromatic coefficients, positive or negative, representing certain proportions of the red (R), green
(G), and blue (B) primaries, respectively1. In Figure 2, we show a graph of the trichromatic coefficients plotted from the values
adopted by the CIE Committee on Colorimetry in 1931. Since these coefficients are normalized, the CIE rg chromaticity space
can also be represented in the form of the rg chromaticity diagram shown in Figure 3, the b coordinate being directly deduced
from the r and g coordinates. The curved line is the spectral locus. The red (1,0,0), green (0,1,0), and blue (0,0,0) points on
that curve correspond to the 3 primary colours. The white point (E) is the Equal Energy point where r = g = b. Notice that the
spectral locus is completely enclosed in a triangle (dashed lines) formed by the virtual points Cr, Cg and Cb. The Equal Energy
point and the vertices of the dashed triangle are located at the following coordinates:
E Cr Cg Cb
r 1/3 1.27496 -1.73930 -0.74310
g 1/3 -0.27777 2.76726 0.14091
b 1/3 0.00281 -0.02795 1.60219
Table 2: Coordinates of the equal energy point and three primary colours in the CIE RGB colour space.
To draw the dashed triangle in Figure 3, the vertices were chosen arbitrarily but conscientiously. The line that passes through
Cb and Cr is known as the alychne, a word coined by Erwin Schrödinger, meaning "no light" in Ancient Greek: it is
1 In CIE's convention, lower case letters represent the chromaticity coordinates in a colour space of the same name written in upper case
letters (e.g., r, g, and b coordinates in the CIE RGB colour space).
2.0
1.5
Trichromatic coefficients: r,g,b
1.0
0.5
0.0
-0.5 r
g
-1.0 b
-1.5
380 420 460 500 540 580 620 660 700 740 780
Wavelength, λ (nm)
Figure 2: Trichromatic coefficients r,g, and b of the CIE 1931 standard observer.
3.0
Cg
2.5
2.0
1.5
g
1.0
0.5
E
Cb
0.0
Cr
-2.0 -1.0 0.0 1.0 2.0
-0.5
r
the line of zero luminance in the colour space. The line that passes through Cg and Cr is located just above the green and red
primaries. As for the line that passes through Cg and Cb, it was chosen so as to keep the size of the triangle small. On the
spectral locus, the closest point is approximately that of the 504 nm wavelength.
0.9
0.8
0.7
0.6
0.5
y
0.4
E
0.3
0.2
0.1
0.0
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
x
Figure 4: CIE 1931 xy chromaticity diagram. The triangle defined by the red, green, and blue points is the
gamut of the original RGB space.
𝐸0,𝑥 0.61822
𝐸0 = [𝐸0,𝑦 ] [0.17182]
𝐸0,𝑧 0.20996
The CIE wanted the coordinate of the Equal Energy point to remain unchanged through the transformation RGB → XYZ. The
xyz coordinates being normalized, one can see that the appropriate matrix transformation, M, is of the form:
𝑦̅(𝜆) = 𝑉(𝜆)
It can be straightforwardly shown that the other colour matching function must satisfy the following relations:
x V(𝜆)
x̅(𝜆) = V(𝜆), z̅(𝜆) = (1 − x − y)
y y
As for the r̄(λ), ḡ(λ), and b̄(λ) colour matching functions, because they have a physical significance, an appropriate scaling
factor needed to be used for XYZ→RGB transformation. Indeed, the r̄(λ), ḡ(λ), and b̄(λ) functions were normalized so that:
The ratios 1 : 4.5907 : 0.0601 correspond to the relative luminances of the trichromatic stimuli. Hence, the parameter
k = 5.6508 that was used above without further explanation (1 + 4.5907 + 0.0601 = 5.6508).
The colour matching functions r̄(λ), ḡ(λ), b̄(λ) can be obtained through the matrix transformation:
0.4
r̄(λ)
ḡ(λ)
0.3
b̄(λ)
0.2
0.1
0.0
-0.1
360 400 440 480 520 560 600 640 680 720 760 800
Wavelength, λ (nm)
Figure 6: CIE RGB colour matching functions
0.9
520
0.8 530
510 540
0.7 550
560
0.6
570
500
0.5 580
y
590
0.4
600
0.3 620
490 D65
750
0.2
480
0.1
470
460
0.0
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
x
Figure 7: CIE 1931 chromaticity diagram and sRGB colour gamut. The curve passing through
the white point D65 is the Planckian locus. The points highlighted on the spectral locus
correspond to monochromatic lights emitted at the indicated wavelengths (in nm).
The coordinates of D65 in the CIE XYZ colour space can be approximated using the theoretical spectral radiant exitance of a
black body heated at T = 6503.15 K:
2𝜋ℎ𝑐 2 ℎ𝑐 −1
𝑀𝑒,𝜆 = 5
(𝑒 𝑘𝑇 − 1)
𝜆
where h is the Planck constant, c is the speed of light in vacuum, k is the Boltzmann constant, T is the temperature in Kelvin,
λ is the wavelength. In practice, this equation is used to draw the Planckian locus curve. In Figure 7, we have drawn the CIE
1931 XYZ chromaticity diagram and included the Planckian locus curve. The dashed triangle shows the gamut of the sRGB
colour space. The colours were calculated using the XYZ→sRGB transformation matrix from the official sRGB documentation:
2 GNU Octave, scientific programming language. Version used: GNU Octave 6.2.0.
[ https://octave.org/ ]
0.8
0.7
G
0.6
λ = 570 nm
0.5
y
0.4
R
0.3 D65
0.2
0.1
B
0.0
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
x
Figure 8: Calculating saturated colour coordinates for sRGB colour space. The line that joins point
D65 and a specific point on the spectral locus (e.g., 570 nm monochromatic wavelength) crosses
the triangle gamut at a specific coordinate (e.g., x = 0.4166; y = 0.5074).
These linear RGB values are not the final result. Gamma correction must be applied to obtain the final non-linear sRGB values.
The following formula transforms the linear values into sRGB:
12.92 𝐶𝑙𝑖𝑛𝑒𝑎𝑟 , 𝐶𝑙𝑖𝑛𝑒𝑎𝑟 ≤ 0.0031308
𝐶𝑠𝑅𝐺𝐵 = { 1/2.4
1.055𝐶𝑙𝑖𝑛𝑒𝑎𝑟 − 0.055, 𝐶𝑙𝑖𝑛𝑒𝑎𝑟 ≤ 0.0031308
0.9
x
0.8
y
0.7 z
0.6
Coordinates
0.5
0.4
0.3
0.2
0.1
0
380 420 460 500 540 580 620 660 700
Wavelength, λ (nm)
Figure 9: Saturated colour coordinates in sRGB colour space and corresponding monochromatic
wavelengths. For example, for 570 nm (yellow), the corresponding coordinates are: x = 0.4166; y = 0.5074;
z = 0.076.
3.5
3.0
r̄
ḡ
2.5
b̄
2.0
1.5
1.0
0.5
0.0
380 420 460 500 540 580 620 660 700 740 780 820
Wavelength, λ (nm)
Figure 10: linear RGB values and corresponding wavelengths for colour coordinates shown in Figure 8.
where C is either R, G, or B. These gamma-corrected values are usually clipped to the 0 to 1 range. For 24-bit RGB, 8 bits (256
levels) are used for each colour channel. This is done by multiplying 𝐶𝑠𝑅𝐺𝐵 by 255 and rounding the result to an integer.
8. Summary
Colour spectrum representation was chosen as an example to illustrate the usefulness of the CIE 1931 chromaticity diagram.
As you could expect, the use of the CIE 1931 XY colour space extends far beyond this simple case. To take but only few
applications, colour LEDs data sheets are always provided with their bin specification in terms of xy coordinates in the CIE XY
colour space; lightings are specified with a colour rendering index (CRI) calculated in the CIE colour space by comparing the
colour rendering of a test source with an ideal source with a given correlated colour temperature (CCT); comparison of colour
cameras passes through gamut analysis that is best displayed using the CIE chromaticity diagram.
3 Useful reading in relation with section 7: "Making Color Spectrum Plots – Part 2," Steve Eddins, July 20, 2020.
[ https://blogs.mathworks.com/steve/2020/07/20/making-color-spectrum-plots-part-2/ ]
Figure 11: Rendering of the solar spectrum with consideration of the sRGB gamut limitations.
Plotted with GNU Octave v. 6.2.0 using the script 'RGB_to_spectrum.m' provided in this technical note.
% CIE standard illuminant D65. For sRGB, the white point has chromaticity coordinates (0.3127, 0.3290).
% This white point is also known as D65, which is an estimation of the white colour produced by mid-day sunlight.
D65 = [0.31271 0.32902];
% Get brighter spectral colours, including a good yellow, scale up the linear RGB values,
% allowing them to get higher than 1.0. Then, for each colour, scale all components back down,
% if necessary, so that the maximum component value is 1.0.
rgb = rgb / max(rgb(:));
rgb = rgb*2.5;
S = max(rgb,[],2);
S = max(S,1);
rgb = rgb ./ S;
rgb = min(max(rgb,0),1);
N = length(CIE_x); i = 1; e = D65;
White_point = e;
sectors_mono = 8; % The larger these values, the better the graph quality
sectors_purple = 7; % (e.g., > 5 sectors gives good results).
sectors = sectors_mono;
xy4rgb = zeros(N*sectors*4,5,'double');
for w = 1:N % equiv. wavelength
w2 = mod(w,N)+1;
a1 = atan2(CIE_y(w) -e(2),CIE_x(w) -e(1)); % start angle
a2 = atan2(CIE_y(w2) -e(2),CIE_x(w2) -e(1)); % end angle
r1 = ((CIE_x(w) - e(1))^2 + (CIE_y(w) - e(2))^2)^0.5; % start radius
r2 = ((CIE_x(w2) - e(1))^2 + (CIE_y(w2) - e(2))^2)^0.5; % end radius
if(w >= N-10 || w <=10)
sectors = sectors_purple;
else
sectors = sectors_mono;
endif
text(0.1,-0.17,'To interrupt this script, open the Command Window tab in {\itOctave} and type {\bfCTRL + C}', 'Color',
[0.5 0.5 0.5],'FontSize',12);
%% This GNU Octave (v. 6.2.0) script was prepared by Christophe Yamahata, idonus Sàrl.
%% Copy the script and save the file as, e.g., 'RGB_to_spectrum.m'
clear;
lambda = [ 380:1:730]'; % Wavelength range: 380 nm - 730 nm (1 nm increment)
R = [ 1 1 1 2 2 2 2 2 3 3 3 4 5 7 8 9 10 11 13 14 15 17 18 20 21 23 25 26 28 29 31 33 35 37 39 41 43 45 47 49 51 52 ...
53 54 55 56 57 58 59 60 61 63 64 66 67 69 70 72 73 75 76 77 77 78 78 79 79 80 80 81 81 79 78 76 75 73 71 70 68 67 ...
65 59 52 46 39 33 26 20 13 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 11 16 22 27 32 38 43 49 54 67 80 93 106 119 132 145 158 171 ...
184 191 197 204 211 218 224 231 238 244 251 251 252 252 253 253 253 254 254 255 255 255 255 255 255 255 255 ...
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 ...
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 251 247 243 239 235 230 226 222 218 214 ...
209 205 200 196 191 186 182 177 173 168 164 160 157 153 149 145 141 138 134 130 127 123 120 117 114 110 107 ...
104 100 97 94 92 99 86 84 81 78 75 73 70 68 65 63 60 58 55 53 50 48 45 44 42 41 39 38 37 35 34 32 31 30 29 28 27 ...
26 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 10 9 9 8 8 7 7 6 6 5 ]';
G = [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 16 24 32 40 48 56 64 72 80 84 88 92 96 100 103 107 111 115 119 122 124 127 ...
129 132 135 137 140 142 145 149 152 156 159 163 167 170 174 177 181 185 189 193 197 201 205 209 213 217 221 ...
224 228 231 235 238 241 245 248 252 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 ...
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 ...
255 255 255 255 255 255 252 248 245 242 239 235 232 229 225 222 217 212 207 202 197 192 187 182 177 172 167 ...
161 156 150 145 140 134 129 123 118 110 101 93 84 76 68 59 51 42 34 31 27 24 20 17 14 10 7 3 0 0 0 0 0 0 0 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]';
B = [ 3 4 5 6 7 8 8 9 10 11 12 15 17 20 23 26 28 31 34 36 39 42 45 49 52 55 58 61 65 68 71 75 79 82 86 90 94 98 101 ...
105 109 111 114 116 118 121 123 125 127 130 132 136 140 144 148 152 155 159 163 167 171 175 178 182 185 189 ...
193 196 200 203 207 212 217 221 226 231 236 241 245 250 255 253 250 248 245 243 241 238 236 233 231 227 222 ...
218 213 209 205 200 196 191 187 185 183 180 178 176 174 172 169 167 165 165 165 165 165 166 166 166 166 166 ...
166 167 168 169 170 172 173 174 175 176 177 178 178 179 180 181 181 182 183 183 184 184 183 183 183 183 182 ...
182 182 181 181 178 175 172 169 166 162 159 156 153 150 135 120 105 90 75 60 45 30 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 15 22 29 37 44 51 58 66 73 73 ...
74 74 74 75 75 75 75 76 76 75 75 74 73 73 72 71 70 70 69 67 66 64 63 61 60 58 57 55 54 53 51 50 49 48 46 45 44 42 ...
41 40 39 37 36 35 34 33 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 9 8 8 7 7 6 6 5 5 4 4 4 3 ...
3 3 3 3 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]';
RGB = [ R G B];
Customized UV-LED exposure system installed on a Double image microscope A model of wafer chuck
roll-to-roll machine
C
re
at
iv
e
e
n
gi
n
About
e idonus
er
in
Founded in 2004, idonus is a Swiss company that
g
develops and manufactures special equipment for the
a
MEMS and watchmaking industries. Our product
n
portfolio includes UV-LED exposure systems for
d
photolithography, IR microscope for wafer inspection,
m
vapor phase chemical etcher for silicon-based devices.
a
Since 2016, we also provide ion implantation services
n
and machines for the surface treatment of materials.
uf
ac
tu
ri
n
Contact
g
us for
more
• details:
O
ur
Christian SPOERL idonus sàrl T: +41 32 724 44 40
e
Managing Director Rouges-Terres 61 info@idonus.com
n
sales@idonus.com CH – 2068 Hauterive www.idonus.com
gi
n
e
er
in
© 2022 idonus sàrl. All rights reserved.
g
te
View publication stats