Theory of Chromatic Vision Simulator 4.0

1. Overview

This paper describes the color transformation by which the app "Chromatic Vision Simulator" 4.0 simulates the appearance of an image for each type of color vision (protanope, deuteranope, tritanope). The essential point is that the color of each pixel of the image is mapped into the LMS space, which represents the responses of the cones, projected by the method of Brettel et al. [1] onto the surface that corresponds to the color appearance of a dichromat, and mapped back to the original color space. The framework of this paper is a reorganization, for version 4.0, of the mathematical expressions in the appendix of the README of the Android version 3.3.1 of the same app [2]. In addition, §7 states in outline the theory of displaying the name of the color that has been read.

1-1. Assumptions

The following are assumed throughout this paper.

  1. 1. White point: D65, (x,y)=(0.3127, 0.3290)(x,y)=(0.3127,\,0.3290) (the defined value in the sRGB and Display P3 standards [3][4][5]). It is common to all conversions.
  1. 2. Observer: the XYZ of the colors of the image is that of the CIE 1931 2° standard observer [6] (the definition of XYZ [7][8]). Only the construction of the cone matrix (§4-1) and the chromaticity coordinates of the anchor stimuli of dichromacy (§5-1) use the color-matching functions of the CIE 1964 10° supplementary standard observer (the X10Y10Z10 system) [7] and their chromaticity coordinates, taken from Table 2 of JIS Z 8701 [9].
  1. 3. Color spaces: the input and the display are each either sRGB [3] or Display P3 [4][5]. The two share the same transfer function and differ only in the primaries (§2, §3).
  1. 4. Quantization: 8 bits (00 to 255255). The encoded value is treated as a real number in [0,1][0,1] obtained by dividing the pixel value by 255255.
  1. 5. Chromatic adaptation: since the white points of the input and the display are both D65, no chromatic adaptation transform is applied.
  1. 6. Cone space: the conversion from XYZ to LMS uses a 3×3 matrix that keeps the shape of the Hunt–Pointer–Estévez (HPE) cones and is built from the 10° XYZ, normalized to D65 [9][10][11].
  1. 7. Types of color vision: complete dichromacy is simulated (protanopia is the absence of the L cone, deuteranopia of the M cone, and tritanopia of the S cone). The simulation strength is a value for showing the intermediate image between the color appearance of the most severe form of dichromacy of each type (100%) and the original image (0%). It does not simulate the color appearance of anomalous trichromacy (mild color vision deficiency) (§5).
  1. 8. Difference mode: the color difference is the Oklab distance between the original image and the simulated image, and the target is the simulation result including the strength kk (§8).

1-2. Notation

  • R, G, BR,\,G,\,B: the components of linear RGB, taken in 0≤value≤10\le\text{value}\le 1 with white equal to 11. X, Y, ZX,\,Y,\,Z: the components of XYZ (YY is 11 for white).
  • c\mathbf{c}: the encoded RGB (each component VV, 0≤V≤10\le V\le 1). xx: the linear value (0≤x≤10\le x\le 1). The chromaticity coordinates (x, y)(x,\,y) use the same letter as the linear value xx, but in §3 and §4 they denote chromaticity coordinates.
  • L, M, SL,\,M,\,S: the components of the cone responses (LMS). We write q=(L,M,S)T\mathbf{q}=(L,M,S)^{\mathsf T}. For the D65 white, q=(1,1,1)T\mathbf{q}=(1,1,1)^{\mathsf T}.
  • MLMSM_{\mathrm{LMS}}: the XYZ → LMS conversion matrix. MM: the RGB → XYZ conversion matrix. PsP_s: the matrix representing the projection onto a half-plane of a dichromat.
  • kk: the strength parameter (0≤k≤10\le k\le 1). k=1k=1 is complete dichromacy and k=0k=0 is the original color.

1-3. Flow of the processing

For each pixel of the image, the processing is applied in the following order.

encoded RGB ──(§2) decoding──▶ linear RGB ──(§3, §4) matrices──▶ LMS
LMS ──(§5) projection onto a half-plane and mixing by strength──▶ LMS′
LMS′ ──(§4, §3) matrices──▶ linear RGB′ ──(§5-4) gamut limit──▶ ──(§2) encoding──▶ encoded RGB′

Difference mode (§8) displays the Oklab distance between LMS′ and the original LMS as brightness.

2. Transfer functions (gamma)

The relation between the encoded value VV (0≤V≤10\le V\le 1; for 8 bits, pixel value255\frac{\text{pixel value}}{255}) and the linear value xx (0≤x≤10\le x\le 1) is defined as the transfer function [12]. The sRGB function of IEC 61966-2-1 [3] is used.

Decoding (encoded value to linear value):

x={V12.92(V≤0.04045)(V+0.0551.055)2.4(V>0.04045)(1)x=\begin{cases} \dfrac{V}{12.92} & (V\le 0.04045)\\[3mm] \left(\dfrac{V+0.055}{1.055}\right)^{2.4} & (V>0.04045) \end{cases} \tag{1}

Encoding (linear value to encoded value):

V={12.92 x(x≤0.0031308)1.055 x12.4−0.055(x>0.0031308)(2)V=\begin{cases} 12.92\,x & (x\le 0.0031308)\\[1mm] 1.055\,x^{\frac{1}{2.4}}-0.055 & (x>0.0031308) \end{cases} \tag{2}

The two expressions are continuous at V=0.04045V=0.04045 (x=0.0031308x=0.0031308), since 0.0404512.92=0.0031308\frac{0.04045}{12.92}=0.0031308. The transfer function of Display P3 is identical to that of sRGB.

Before encoding, values that have become negative outside the color gamut are replaced by 00 (because a power of a negative number is undefined). Both the decoded and the encoded results are confined to the range 00 to 11.

3. Conversion between RGB and XYZ

Let the linear RGB be the column vector (R,G,B)T(R,G,B)^{\mathsf T}, with the white point D65. The conversion matrices are derived from the chromaticities of the primaries and the white point as follows [8][12].

3-1. Derivation from the primaries and the white point

Let (xi,yi)(x_i,y_i) be the chromaticity of primary ii (i=R,G,Bi=\mathrm{R},\mathrm{G},\mathrm{B}), and define its direction vector

pi=(xiyi11−xi−yiyi)(3)\mathbf{p}_i=\begin{pmatrix} \dfrac{x_i}{y_i}\\[3mm] 1\\[1mm] \dfrac{1-x_i-y_i}{y_i} \end{pmatrix} \tag{3}

Let P=[pR pG pB]P=[\mathbf{p}_{\mathrm R}\ \mathbf{p}_{\mathrm G}\ \mathbf{p}_{\mathrm B}] be the matrix having these vectors as columns, and let W\mathbf{W} be the vector of the same form for the chromaticity (xw,yw)(x_w,y_w) of the white point. The condition that white (R=G=B=1R=G=B=1) is mapped to W\mathbf{W}, namely PS=WP\mathbf{S}=\mathbf{W}, determines the strength coefficients of the primaries, S=P−1W\mathbf{S}=P^{-1}\mathbf{W}. The RGB → XYZ matrix is then

M=P diag(S)(4)M=P\,\mathrm{diag}(\mathbf{S}) \tag{4}

with which white has Y=1Y=1. The XYZ → RGB matrix is the exact inverse M−1M^{-1} of MM.

3-2. sRGB

The chromaticities of the primaries are R(0.64, 0.33)(0.64,\,0.33), G(0.30, 0.60)(0.30,\,0.60), B(0.15, 0.06)(0.15,\,0.06), and the white point is D65 with (x,y)=(0.3127, 0.3290)(x,y)=(0.3127,\,0.3290) (IEC 61966-2-1 [3]). By §3-1, the values derived in double precision are, to seven digits,

(XYZ)=(0.41239080.35758430.18048080.21263900.71516870.07219230.01933080.11919480.9505322)(RGB)(5)\begin{pmatrix}X\\Y\\Z\end{pmatrix}= \begin{pmatrix} 0.4123908 & 0.3575843 & 0.1804808\\ 0.2126390 & 0.7151687 & 0.0721923\\ 0.0193308 & 0.1191948 & 0.9505322 \end{pmatrix} \begin{pmatrix}R\\G\\B\end{pmatrix} \tag{5}
(RGB)=(−3.2409699−1.5373832−0.4986108−0.9692436−1.8759675−0.0415551−0.0556301−0.2039770−1.0569715)(XYZ)(6)\begin{pmatrix}R\\G\\B\end{pmatrix}= \begin{pmatrix} \phantom{-}3.2409699 & -1.5373832 & -0.4986108\\ -0.9692436 & \phantom{-}1.8759675 & \phantom{-}0.0415551\\ \phantom{-}0.0556301 & -0.2039770 & \phantom{-}1.0569715 \end{pmatrix} \begin{pmatrix}X\\Y\\Z\end{pmatrix} \tag{6}

The forward matrix given by the standard to four decimal places coincides with these derived values rounded to four digits. The inverse matrix of the standard to four digits is the rounded inverse of the rounded four-digit forward matrix, and therefore differs from the inverse of the derived matrix above in the fourth digit.

3-3. Display P3

The chromaticities of the primaries are R(0.680, 0.320)(0.680,\,0.320), G(0.265, 0.690)(0.265,\,0.690), B(0.150, 0.060)(0.150,\,0.060), and the white point is D65 with (0.3127, 0.3290)(0.3127,\,0.3290) (SMPTE EG 432-1 [4]; Apple's definition [5]). By §3-1 one obtains likewise

(XYZ)=(0.48657090.26566770.19821730.22897460.69173850.07928690.00000000.04511341.0439444)(RGB)(7)\begin{pmatrix}X\\Y\\Z\end{pmatrix}= \begin{pmatrix} 0.4865709 & 0.2656677 & 0.1982173\\ 0.2289746 & 0.6917385 & 0.0792869\\ 0.0000000 & 0.0451134 & 1.0439444 \end{pmatrix} \begin{pmatrix}R\\G\\B\end{pmatrix} \tag{7}
(RGB)=(−2.4934969−0.9313836−0.4027108−0.8294890−1.7626641−0.0236247−0.0358458−0.0761724−0.9568845)(XYZ)(8)\begin{pmatrix}R\\G\\B\end{pmatrix}= \begin{pmatrix} \phantom{-}2.4934969 & -0.9313836 & -0.4027108\\ -0.8294890 & \phantom{-}1.7626641 & \phantom{-}0.0236247\\ \phantom{-}0.0358458 & -0.0761724 & \phantom{-}0.9568845 \end{pmatrix} \begin{pmatrix}X\\Y\\Z\end{pmatrix} \tag{8}

3-4. Exchanging color spaces

XYZ does not depend on the color space. Therefore, even when the input is sRGB and the display is Display P3, the computation after the conversion to LMS (§4) is common, and only the matrices of the input and the display need to be exchanged.

4. Conversion from XYZ to LMS

4-1. The cone matrix (the 10° version that keeps the shape of HPE)

The cone responses q=(L,M,S)T\mathbf{q}=(L,M,S)^{\mathsf T} are given as a linear transformation of XYZ. This paper uses a 3×3 matrix that keeps the shape of the spectral sensitivities of the cones of Hunt–Pointer–Estévez (HPE) [10] and is built from the XYZ of the CIE 1964 10° supplementary standard observer (the X10Y10Z10 system; Table 2 of JIS Z 8701 [9]). The HPE transform from the CIE 1931 XYZ to the cone responses is expressed by the following matrix, normalized to the equal-energy white (see [11] for an exposition).

ME=(−0.389710.68898−0.07868−0.229811.18340−0.04641−0.000000.00000−1.00000)(9)M_{\mathrm{E}}=\begin{pmatrix} \phantom{-}0.38971 & 0.68898 & -0.07868\\ -0.22981 & 1.18340 & \phantom{-}0.04641\\ \phantom{-}0.00000 & 0.00000 & \phantom{-}1.00000 \end{pmatrix} \tag{9}

The matrix MrawM_{\mathrm{raw}} of the 10° version is found by unweighted least squares over all wavelengths λ\lambda (81 points at 5 nm intervals from 380 nm to 780 nm) so that the 10° color-matching functions xˉ10(λ)=(xˉ10,yˉ10,zˉ10)T\bar{\mathbf{x}}_{10}(\lambda)=(\bar x_{10},\bar y_{10},\bar z_{10})^{\mathsf T} (CIE 1964 [7]; the values are taken at every 5 nm from the 1 nm table of [13]) best reproduce the HPE cone sensitivities ME xˉ2(λ)M_{\mathrm{E}}\,\bar{\mathbf{x}}_{2}(\lambda), where xˉ2\bar{\mathbf{x}}_{2} are the CIE 1931 2° color-matching functions (values also from [13]). Then each row is divided by the corresponding component of MrawWM_{\mathrm{raw}}\mathbf{W}, so that the XYZ of the D65 white point (W\mathbf{W}, §3-1) gives L=M=S=1L=M=S=1.

Mraw=arg minM∑λ∥M xˉ10(λ)−ME xˉ2(λ)∥2,MLMS=diag(n)−1Mraw,n=MrawW(10)M_{\mathrm{raw}}=\mathop{\mathrm{arg\,min}}_{M}\sum_{\lambda}\left\|M\,\bar{\mathbf{x}}_{10}(\lambda)-M_{\mathrm{E}}\,\bar{\mathbf{x}}_{2}(\lambda)\right\|^{2},\qquad M_{\mathrm{LMS}}=\mathrm{diag}(\mathbf{n})^{-1}M_{\mathrm{raw}},\quad \mathbf{n}=M_{\mathrm{raw}}\mathbf{W} \tag{10}

The derived values are, to five digits,

Mraw=(−0.41927−0.60585−0.10325−0.17704−1.12056−0.00536−0.05550−0.06696−0.90930),MLMS=(−0.47008−0.67928−0.11576−0.18706−1.18397−0.00567−0.05526−0.06666−0.90524)(11)\begin{aligned} M_{\mathrm{raw}}&=\begin{pmatrix} \phantom{-}0.41927 & \phantom{-}0.60585 & -0.10325\\ -0.17704 & \phantom{-}1.12056 & -0.00536\\ -0.05550 & \phantom{-}0.06696 & \phantom{-}0.90930 \end{pmatrix},\\[2mm] M_{\mathrm{LMS}}&=\begin{pmatrix} \phantom{-}0.47008 & \phantom{-}0.67928 & -0.11576\\ -0.18706 & \phantom{-}1.18397 & -0.00567\\ -0.05526 & \phantom{-}0.06666 & \phantom{-}0.90524 \end{pmatrix} \end{aligned} \tag{11}

The 10° and 2° color-matching functions are not related exactly by a linear transformation, so the fit leaves a residual (at most 0.23; the maximum of the HPE sensitivities is about 1, and the residual is largest on the short-wavelength side near the S cone). This matrix is not a published standard but an approximation made for this paper, and the shape of the cones remains that of HPE (physical differences of the 10° cones, such as the effect of the macular pigment, are not reflected). The XYZ of the input colors (sRGB and Display P3) remains that of the 2° observer.

By this normalization the D65 white is mapped to q=(1,1,1)T\mathbf{q}=(1,1,1)^{\mathsf T}. In the following, the straight line through this point is called the neutral axis.

4-2. Conversion between linear RGB and LMS

The conversion from linear RGB to LMS is given by the product of MM of Eq. (4) and MLMSM_{\mathrm{LMS}} of Eq. (11).

q=MLMS M(RGB),(RGB)=(MLMS M)−1q(12)\mathbf{q}=M_{\mathrm{LMS}}\,M\begin{pmatrix}R\\G\\B\end{pmatrix},\qquad \begin{pmatrix}R\\G\\B\end{pmatrix}=\left(M_{\mathrm{LMS}}\,M\right)^{-1}\mathbf{q} \tag{12}

When the input and the display are sRGB, the values to seven digits are

MLMSM=(0.33606200.64009540.02384260.17450560.77916950.04632490.00888630.13581410.8552996)(13)M_{\mathrm{LMS}}M=\begin{pmatrix} 0.3360620 & 0.6400954 & 0.0238426\\ 0.1745056 & 0.7791695 & 0.0463249\\ 0.0088863 & 0.1358141 & 0.8552996 \end{pmatrix} \tag{13}
(MLMSM)−1=(−5.1990556−4.2862792−0.0872236−1.1722550−2.2620970−0.0898419−0.1321271−0.3146679−1.1825408)(14)\left(M_{\mathrm{LMS}}M\right)^{-1}=\begin{pmatrix} \phantom{-}5.1990556 & -4.2862792 & \phantom{-}0.0872236\\ -1.1722550 & \phantom{-}2.2620970 & -0.0898419\\ \phantom{-}0.1321271 & -0.3146679 & \phantom{-}1.1825408 \end{pmatrix} \tag{14}

When the input and the display are Display P3, they are

MLMSM=(−0.3842671−0.5895472−0.0261857−0.1800798−0.7690428−0.0508774−0.0116227−0.0722697−0.9393530)(15)M_{\mathrm{LMS}}M=\begin{pmatrix} \phantom{-}0.3842671 & \phantom{-}0.5895472 & \phantom{-}0.0261857\\ \phantom{-}0.1800798 & \phantom{-}0.7690428 & \phantom{-}0.0508774\\ -0.0116227 & \phantom{-}0.0722697 & \phantom{-}0.9393530 \end{pmatrix} \tag{15}
(MLMSM)−1=(−4.0679056−3.1236934−0.0557878−0.9607645−2.0447289−0.0839644−0.1242496−0.1959623−1.0717127)(16)\left(M_{\mathrm{LMS}}M\right)^{-1}=\begin{pmatrix} \phantom{-}4.0679056 & -3.1236934 & \phantom{-}0.0557878\\ -0.9607645 & \phantom{-}2.0447289 & -0.0839644\\ \phantom{-}0.1242496 & -0.1959623 & \phantom{-}1.0717127 \end{pmatrix} \tag{16}

5. Simulation of dichromacy

5-1. Approximation by half-planes

A dichromat lacks one of the three classes of cones. Two stimuli that differ only in the response of the missing cone cannot be distinguished, and in the LMS space the points on a straight line parallel to the axis of the missing component (a confusion line) look like the same color. Therefore the color appearance of a dichromat can be represented by points on a two-dimensional surface of the LMS space. Brettel et al. approximated this surface by two half-planes through the neutral axis and two anchor stimuli on the spectral locus (475 nm and 575 nm for protanopes and deuteranopes, and 485 nm and 660 nm for tritanopes) [1]. The two half-planes meet along the neutral axis.

Each half-plane passes through the origin and contains the LMS w\mathbf{w} of the white and the LMS α\boldsymbol{\alpha} of an anchor stimulus. Writing the missing component as qmq_m and the other two components as qi, qjq_i,\,q_j, a half-plane can be written in the form qm=a qi+b qjq_m=a\,q_i+b\,q_j, and the condition of passing through w\mathbf{w} and α\boldsymbol{\alpha} gives the coefficients

a=wmαj−wjαmwiαj−wjαi,b=wiαm−wmαiwiαj−wjαi(17)a=\frac{w_m \alpha_j-w_j \alpha_m}{w_i \alpha_j-w_j \alpha_i},\qquad b=\frac{w_i \alpha_m-w_m \alpha_i}{w_i \alpha_j-w_j \alpha_i} \tag{17}

In this paper the chromaticity coordinates of the anchor stimuli are the spectral chromaticity coordinates (x10, y10, z10)(x_{10},\,y_{10},\,z_{10}) of the CIE 1964 10° supplementary standard observer (the X10Y10Z10 system), taken from Table 2 of JIS Z 8701 [9] (five digits). The anchor stimuli and the cone matrix of §4-1 are both matched to the 10° observer; the chromaticity coordinates are used as the values (X,Y,Z)(X,Y,Z) and converted to LMS by the matrix MLMSM_{\mathrm{LMS}} of §4-1. The XYZ of the colors of the image remains that of the 2° observer (the definition of sRGB) (since a plane passes through the origin, the magnitude of an anchor stimulus does not affect the coefficients).

Wavelengthx10x_{10}y10y_{10}z10z_{10}
475 nm0.095730.159090.74518
485 nm0.045190.327540.62727
575 nm0.509640.490360.00000
660 nm0.716790.283210.00000

The correspondence between the two half-planes and the anchor stimuli is as follows: for protanopes and deuteranopes, the side where the response of SS is small (S≤MS\le M, S≤LS\le L) corresponds to 575 nm and the other side to 475 nm; for tritanopes, the side M≤LM\le L corresponds to 660 nm and the other side to 485 nm (the boundary of the selection is given in §5-2). The white w\mathbf{w} is the LMS (1,1,1)T(1,1,1)^{\mathsf T} of the D65 white (the normalization of §4-1). The simulated color qs\mathbf{q}_s is the point obtained from the original color q\mathbf{q} by replacing only the missing component, and can be written qs=Psq\mathbf{q}_s=P_s\mathbf{q} with a matrix PsP_s (a projection parallel to the missing axis). Since w=(1,1,1)T\mathbf{w}=(1,1,1)^{\mathsf T}, Eq. (17) gives a+b=1a+b=1 exactly, and the half-plane contains the neutral axis. The coefficients are, to five digits, as follows.

Protanopia (absence of the L cone; Lp=aM+bSL_p=aM+bS):

qs={(01.18188−0.18188010001)q(S≤M)(01.19356−0.19356010001)q(S>M)(18)\mathbf{q}_s=\begin{cases} \begin{pmatrix}0&1.18188&-0.18188\\0&1&0\\0&0&1\end{pmatrix}\mathbf{q} & (S\le M)\\[6mm] \begin{pmatrix}0&1.19356&-0.19356\\0&1&0\\0&0&1\end{pmatrix}\mathbf{q} & (S>M) \end{cases} \tag{18}

Deuteranopia (absence of the M cone; Md=aL+bSM_d=aL+bS):

qs={(1000.8461100.15389001)q(S≤L)(1000.8378300.16217001)q(S>L)(19)\mathbf{q}_s=\begin{cases} \begin{pmatrix}1&0&0\\0.84611&0&0.15389\\0&0&1\end{pmatrix}\mathbf{q} & (S\le L)\\[6mm] \begin{pmatrix}1&0&0\\0.83783&0&0.16217\\0&0&1\end{pmatrix}\mathbf{q} & (S>L) \end{cases} \tag{19}

Tritanopia (absence of the S cone; St=aL+bMS_t=aL+bM):

qs={(100010−0.676481.676480)q(M≤L)(100010−1.032792.032790)q(M>L)(20)\mathbf{q}_s=\begin{cases} \begin{pmatrix}1&0&0\\0&1&0\\-0.67648&1.67648&0\end{pmatrix}\mathbf{q} & (M\le L)\\[6mm] \begin{pmatrix}1&0&0\\0&1&0\\-1.03279&2.03279&0\end{pmatrix}\mathbf{q} & (M>L) \end{cases} \tag{20}

The coefficients of this paper (from the 10° anchors and the 10° version of the cone matrix) are compared below with the values of version 2.x of the original app (HPE 2° cones with 10° anchors; computed from the four-digit XYZ of the anchors and the white of the four-digit sRGB matrix). Because the cone matrix differs, the difference is at most 1.6×10−11.6\times 10^{-1} (the coefficient aa of half-plane 2 for the tritanope).

TypeHalf-planeThis paper (a, b)(a,\,b)Original 2.x (a, b)(a,\,b)
Protanope1(1.18188, −0.18188)(1.18188,\ -0.18188)(1.20800, −0.20797)(1.20800,\ -0.20797)
Protanope2(1.19356, −0.19356)(1.19356,\ -0.19356)(1.22023, −0.22020)(1.22023,\ -0.22020)
Deuteranope1(0.84611, 0.15389)(0.84611,\ 0.15389)(0.82781, 0.17216)(0.82781,\ 0.17216)
Deuteranope2(0.83783, 0.16217)(0.83783,\ 0.16217)(0.81952, 0.18046)(0.81952,\ 0.18046)
Tritanope1(−0.67648, 1.67648)(-0.67648,\ 1.67648)(−0.52543, 1.52540)(-0.52543,\ 1.52540)
Tritanope2(−1.03279, 2.03279)(-1.03279,\ 2.03279)(−0.87504, 1.87503)(-0.87504,\ 1.87503)
Figure 1: The surfaces occupied by dichromatic colors on the chromaticity diagram
Figure 1: The surfaces occupied by dichromatic colors on the chromaticity diagram. The spectral locus, the triangles of the sRGB and Display P3 primaries, the white D65, and the lines that the two half-planes of the protanope, the deuteranope, and the tritanope form on the CIE 1976 UCS chromaticity diagram (the u′v′u'v' diagram; u′=4X/(X+15Y+3Z)u'=4X/(X+15Y+3Z), v′=9Y/(X+15Y+3Z)v'=9Y/(X+15Y+3Z) [7]) are shown. The spectral locus is drawn from the table of the CIE 1964 10° color matching functions [13]. Since a half-plane is a plane through the origin, it appears on the chromaticity diagram as a line through the white. Each line bends at the white. The lines of the protanope and the deuteranope almost overlap, so they are drawn slightly shifted perpendicular to the lines on the screen for legibility.

5-2. Selection of the half-plane

Which of the two half-planes is used is determined by which side of the neutral axis the original color q\mathbf{q} lies on. The boundary of the selection is the plane containing the neutral axis and the axis of the missing cone (LL axis for protanopes, MM axis for deuteranopes, SS axis for tritanopes): S=MS=M for protanopes, S=LS=L for deuteranopes, and M=LM=L for tritanopes. At a point on this boundary the two half-planes give the same replacement because a1+b1=a2+b2=1a_1+b_1=a_2+b_2=1. For protanopes, for example, at S=MS=M,

a1M+b1S=(a1+b1)M=M=(a2+b2)M=a2M+b2S(21)a_1M+b_1S=(a_1+b_1)M=M=(a_2+b_2)M=a_2M+b_2S \tag{21}

Therefore the result of the simulation is continuous at the boundary.

5-3. Mixing by strength

The simulation with strength kk (0≤k≤10\le k\le 1) is given by an interpolation between the original color q\mathbf{q} and the complete dichromatic simulation qs\mathbf{q}_s. Version 2.x of the original app interpolated q\mathbf{q} and qs\mathbf{q}_s linearly in the LMS space. In this paper (version 4.0), both are first limited to the gamut of the display, and then interpolated linearly in the Oklab space [14].

(1) Limiting to the gamut. The linear RGB of the display is given by MoutqM_{\mathrm{out}}\mathbf{q} (MoutM_{\mathrm{out}} of Eq. (30)); it is limited componentwise to the range 00 to 11 and converted back to LMS.

C(q)=Mout−1 clip ⁣(Mout q)(22)C(\mathbf{q})=M_{\mathrm{out}}^{-1}\,\mathrm{clip}\!\left(M_{\mathrm{out}}\,\mathbf{q}\right) \tag{22}

(2) Conversion to Oklab. The LMS is converted back to XYZ and mapped by Ottosson's matrix M1M_1 to the cone-like responses q′\mathbf{q}' of Oklab; the cube root of each component is taken, and the matrix M2M_2 gives (L,a,b)(L,a,b).

o(q)=M2 M1 MLMS−1 q3(23)\mathbf{o}(\mathbf{q})=M_2\,\sqrt[3]{M_1\,M_{\mathrm{LMS}}^{-1}\,\mathbf{q}} \tag{23}

The cube root is the componentwise signed cube root (x3=sgn(x) ∣x∣1/3\sqrt[3]{x}=\mathrm{sgn}(x)\,|x|^{1/3}). The matrices are as follows (M1M_1 maps XYZ (D65, with Y=1Y=1 for white) to q′\mathbf{q}', and M2M_2 maps the cube roots of q′\mathbf{q}' to (L,a,b)(L,a,b)).

M1=(−0.81893301010.3618667424−0.1288597137−0.03298454360.9293118715−0.0361456387−0.04820030180.2643662691−0.6338517070)M2=(−0.2104542553−0.7936177850−0.0040720468−1.9779984951−2.4285922050−0.4505937099−0.0259040371−0.7827717662−0.8086757660)(24)\begin{aligned} M_1&=\begin{pmatrix} \phantom{-}0.8189330101 & 0.3618667424 & -0.1288597137\\ \phantom{-}0.0329845436 & 0.9293118715 & \phantom{-}0.0361456387\\ \phantom{-}0.0482003018 & 0.2643662691 & \phantom{-}0.6338517070 \end{pmatrix}\\[4mm] M_2&=\begin{pmatrix} \phantom{-}0.2104542553 & \phantom{-}0.7936177850 & -0.0040720468\\ \phantom{-}1.9779984951 & -2.4285922050 & \phantom{-}0.4505937099\\ \phantom{-}0.0259040371 & \phantom{-}0.7827717662 & -0.8086757660 \end{pmatrix} \end{aligned} \tag{24}

(3) Inverse conversion. From o\mathbf{o} back to LMS, apply M2−1M_2^{-1}, then the componentwise cube, then M1−1M_1^{-1}, then MLMSM_{\mathrm{LMS}}.

q=MLMS M1−1 (M2−1o)∘3(25)\mathbf{q}=M_{\mathrm{LMS}}\,M_1^{-1}\,\left(M_2^{-1}\mathbf{o}\right)^{\circ 3} \tag{25}

where (⋅)∘3(\cdot)^{\circ 3} is the componentwise cube. The values of the inverse matrices are as follows.

M1−1=(−1.2270139−0.5578000−0.2812561−0.0405802−1.1122569−0.0716767−0.0763813−0.4214820−1.5861632)M2−1=(1.0000000−0.3963378−0.21580381.0000000−0.1055613−0.06385421.0000001−0.0894842−1.2914855)(26)\begin{aligned} M_1^{-1}&=\begin{pmatrix} \phantom{-}1.2270139 & -0.5578000 & \phantom{-}0.2812561\\ -0.0405802 & \phantom{-}1.1122569 & -0.0716767\\ -0.0763813 & -0.4214820 & \phantom{-}1.5861632 \end{pmatrix}\\[4mm] M_2^{-1}&=\begin{pmatrix} 1.0000000 & \phantom{-}0.3963378 & \phantom{-}0.2158038\\ 1.0000000 & -0.1055613 & -0.0638542\\ 1.0000001 & -0.0894842 & -1.2914855 \end{pmatrix} \end{aligned} \tag{26}

(4) Interpolation. The Oklab values of the limited q\mathbf{q} and qs\mathbf{q}_s are interpolated linearly with the strength kk and converted back to LMS.

ok=(1−k) o ⁣(C(q))+k o ⁣(C(qs)),qk=o−1(ok)(27)\mathbf{o}_k=(1-k)\,\mathbf{o}\!\left(C(\mathbf{q})\right)+k\,\mathbf{o}\!\left(C(\mathbf{q}_s)\right),\qquad \mathbf{q}_k=\mathbf{o}^{-1}(\mathbf{o}_k) \tag{27}

where o−1\mathbf{o}^{-1} is the inverse conversion of Eq. (25). At k=0k=0 the original color inside the gamut is unchanged (C(q)=qC(\mathbf{q})=\mathbf{q}), and at k=1k=1 the result is C(qs)C(\mathbf{q}_s).

The reason for limiting before the interpolation: for vivid blues and purples, the result qs\mathbf{q}_s of the dichromat simulation has negative components in linear RGB (outside the gamut). If the interpolation in Oklab is performed without limiting, the intermediate colors of the interpolation move outside the gamut, the components stick to 00 in the final limiting, and the color jumps abruptly as the strength is raised. If both end points are limited to the gamut before the interpolation, the intermediate colors also stay inside the gamut.

Compared with the linear interpolation in LMS, the interpolation in Oklab makes the change of appearance closer to uniform when the strength is moved in equal steps. When the strength was moved in steps of 0.10.1, the maximum divided by the minimum of the Oklab distances between adjacent steps was, in a test with six representative colors and three types, at most 4.094.09 for the linear interpolation in LMS and at most 1.141.14 for the interpolation in Oklab.

A method for displaying the difference in color of the simulation result on the screen is described in §8.

5-4. Limiting to the gamut

Since both end points were limited to the gamut before the mixing (Eq. (22)), the mixed color qk\mathbf{q}_k lies inside the gamut except for numerical errors. The limiting after the conversion back to linear RGB is a safeguard against these errors. Components that have become negative outside the gamut are limited to 00, and components exceeding 11 are limited to 11.

(R′G′B′)=min⁡ ⁣(max⁡ ⁣((MLMSM)−1qk, 0), 1)(28)\begin{pmatrix}R'\\G'\\B'\end{pmatrix}= \min\!\left(\max\!\left(\left(M_{\mathrm{LMS}}M\right)^{-1}\mathbf{q}_k,\ 0\right),\ 1\right) \tag{28}

When the simulation with k=1k=1 is applied to all the colors of sRGB (the 33333^{3} points obtained by taking 33 equally spaced steps of the encoded value for each component), the proportions of the colors that fall outside the gamut before the limiting (qs\mathbf{q}_s) are as follows. Achromatic colors (colors on the neutral axis) do not move.

TypeColors with a negative componentColors with a component exceeding 11
Protanope29.1%10.6%
Deuteranope23.2%4.3%
Tritanope8.2%1.9%
Figure 2: Chromaticity shifts by the dichromat simulation (strength 1)
Figure 2: Chromaticity shifts by the dichromat simulation (strength 1). For the primaries and secondaries of sRGB (red, green, blue, cyan, magenta, yellow), the original chromaticity (circle) and the simulated chromaticity (arrow head) are shown in three diagrams, one for each type. The chromaticity diagram is the same u′v′u'v' diagram as in Figure 1. Each diagram overlays, in pale lines, the confusion lines of its type (sequences of colors that differ only in the response of the missing cone). A confusion line is a straight line from the copunctal point of the type (the chromaticity of the direction of the axis of the missing cone), shown only within the region of the chromaticity diagram. The angular spacing of the lines is 3° for the protanope and the tritanope and about 4° for the deuteranope, chosen so that the spacing of the lines near the white equals that of the protanope. The shift by the simulation before the gamut limit runs along a confusion line. A color whose end point falls outside the gamut moves to the inside of the gamut on the display by the gamut limit (§5-4).

6. The overall transformation

Including the case where the color spaces of the input and the display differ, the transformation from the encoded input cin\mathbf{c}_{\mathrm{in}} to the encoded output cout\mathbf{c}_{\mathrm{out}} is written as the composition of §2 to §5.

cout=enc ⁣(clip ⁣(Mout qk))(29)\mathbf{c}_{\mathrm{out}}=\mathrm{enc}\!\left(\mathrm{clip}\!\left(M_{\mathrm{out}}\,\mathbf{q}_k\right)\right) \tag{29}

Here enc\mathrm{enc} is the encoding of Eq. (2) (component by component), clip\mathrm{clip} is the limit of Eq. (28), and qk\mathbf{q}_k is the mixture of Eq. (27). The q\mathbf{q} used in the mixture is q=Min dec(cin)\mathbf{q}=M_{\mathrm{in}}\,\mathrm{dec}(\mathbf{c}_{\mathrm{in}}) (dec\mathrm{dec} is the decoding of Eq. (1)), qs=Ps(q) q\mathbf{q}_s=P_s(\mathbf{q})\,\mathbf{q}, and Ps(q)P_s(\mathbf{q}) is the matrix selected from Eqs. (18) to (20) according to the type and the position of q\mathbf{q}. With McapM_{\mathrm{cap}} the matrix of the color space of the input and MdispM_{\mathrm{disp}} that of the display (both of the form of Eq. (4)),

Min=MLMS Mcap,Mout=(MLMS Mdisp)−1(30)M_{\mathrm{in}}=M_{\mathrm{LMS}}\,M_{\mathrm{cap}},\qquad M_{\mathrm{out}}=\left(M_{\mathrm{LMS}}\,M_{\mathrm{disp}}\right)^{-1} \tag{30}

The numerical values for the case where the input and the display are both sRGB or both Display P3 are given in §4-2.

7. Display of color names

This section states, in outline only, the theory of the process that reads the color at one point of an image and displays its color name and color values (the display of color names). The names are the systematic color names and the traditional color names of the Japanese Industrial Standard JIS Z 8102 [15] (the default of the Japanese screen). The English color names are described in §7-6. Below, the XYZ of a color is the D65 value obtained in §3, and the reading is made on the original image (before the simulation).

7-1. How the color to read is determined

A single pixel is easily affected by sensor noise and fine patterns. The color to read is therefore the Gaussian-weighted average, in the Oklab space [14], of the pixels around the pointed position. From the XYZ (D65) of pixel ii, the Oklab value oi=M2M1 xi3\mathbf{o}_i=M_2\sqrt[3]{M_1\,\mathbf{x}_i} (xi=(X,Y,Z)T\mathbf{x}_i=(X,Y,Z)^{\mathsf T}) is computed with the same matrices as in Eq. (23), and the weight at the position di\mathbf{d}_i (the distance of the pixel from the pointed position, in pixels) is

wi=exp⁡ ⁣(−∥di∥22σ2),oˉ=∑iwi oi∑iwi(31)w_i=\exp\!\left(-\frac{\lVert\mathbf{d}_i\rVert^{2}}{2\sigma^{2}}\right),\qquad \bar{\mathbf{o}}=\frac{\sum_i w_i\,\mathbf{o}_i}{\sum_i w_i} \tag{31}

The sum is taken over the pixels within 3σ3\sigma of the pointed position in both directions, and oˉ\bar{\mathbf{o}} converted back to XYZ by the inverse Oklab transformation is the color to read. σ\sigma is fixed as a length on the screen (6 pt) and converted to the size of the pixels of the original image, so that the same area on the screen is read regardless of zooming. Oklab is highly uniform perceptually and has small hue shifts, so the average is a color that looks intermediate.

7-2. Systematic color names

A systematic color name is determined by expressing the color in Munsell hue HH, value VV and chroma CC and applying it to the regions defined by JIS Z 8102. The values of the Munsell system follow JIS Z 8721 [16] and ASTM D1535 [17].

Value. The relation between the luminance factor YY (white is 11) and the Munsell value VV is the fifth-degree polynomial

Y=1100(1.1913 V−0.22532 V2+0.23351 V3−0.020483 V4+0.00081936 V5)(32)Y=\frac{1}{100}\left(1.1913\,V-0.22532\,V^{2}+0.23351\,V^{3}-0.020483\,V^{4}+0.00081936\,V^{5}\right) \tag{32}

[16] (the coefficients are the values of JIS Z 8721; those given for [17] differ in the last digit, see the note to reference [17]). This function increases monotonically for 0≤V≤100\le V\le 10, so VV is obtained by solving the exact inverse of Eq. (32) numerically.

Hue and chroma. The Munsell renotation table [17][18] gives the chromaticities (x,y)(x,y) of the grid points of hue and chroma for each value level. The XYZ of the color to read is converted to the chromaticity (x,y)(x,y) adapted to illuminant C (§7-4); for each value level, the position of the chromaticity point inside the cell of the grid that contains it is found by inverse bilinear interpolation, which gives hue and chroma. The results of the two levels that enclose the point are interpolated linearly in value. A color whose chroma is less than 0.0050.005 is achromatic (N V\mathrm{N}\,V). When the chromaticity point lies outside the table, the chromaticity is shrunk toward the white point of illuminant C while the value and the hue are kept, and the outermost point that falls inside the table is used.

Regions of systematic color names. JIS Z 8102 defines the systematic color names as a table of rectangles in Munsell hue, value and chroma. The (H,V,C)(H,V,C) rounded to five digits is applied to the rectangles of this table (boundaries included) to find the symbol of the systematic color, and the symbol is turned into a name (for example, light grayish greenish yellow) [15].

7-3. Traditional color names

Of the traditional color names of JIS Z 8102, the 267 that are defined by Munsell values each use their Munsell value [15]. From the Munsell value of each traditional color, the XYZ under illuminant C is obtained and converted to D65 by the chromatic adaptation of §7-4, which gives the CIELAB value Lk\mathbf{L}_k (D65 white, L∗, a∗, b∗L^{*},\,a^{*},\,b^{*}; formulas in [7]). The traditional color nearest to the CIELAB value L\mathbf{L} of the color to read is selected as follows.

k∗=arg⁡min⁡k  ΔE00 ⁣(L, Lk)(33)k^{\ast}=\underset{k}{\arg\min}\;\Delta E_{00}\!\left(\mathbf{L},\,\mathbf{L}_k\right) \tag{33}

The distance ΔE00\Delta E_{00} is CIEDE2000 (CIE 142:2001 [19]; computed with the formulas of [20]) by default. When the distance to the nearest color exceeds 1010, that traditional color cannot be called close, and a "?" is appended to the name. A traditional color whose coordinates are shared by several names is shown with all of them.

7-4. Chromatic adaptation and the observer

The Munsell values and the traditional colors of JIS Z 8102 are defined under illuminant C and the CIE 1931 2° standard observer, whereas the white of the screen is D65. Therefore the XYZ of D65 is adapted to illuminant C before it is converted to Munsell values, and the XYZ of the traditional colors is adapted to D65 before it is converted to CIELAB. The adaptation is a linear transformation of the Von Kries type in the cone space of Hunt–Pointer–Estévez [10][11]. Let wD65\mathbf{w}_{\mathrm{D65}} (chromaticity (0.3127, 0.3290)(0.3127,\,0.3290)) and wC\mathbf{w}_{\mathrm{C}} (chromaticity (0.31006, 0.31616)(0.31006,\,0.31616)) be the XYZ of the white points (Y=1Y=1); with the matrix MEM_{\mathrm{E}} of Eq. (9) (the HPE for 2°), the transformation from D65 to C is

AD65→C=ME−1 diag ⁣(ME wCME wD65)ME(34)A_{\mathrm{D65}\to\mathrm{C}}=M_{\mathrm{E}}^{-1}\, \mathrm{diag}\!\left(\frac{M_{\mathrm{E}}\,\mathbf{w}_{\mathrm{C}}}{M_{\mathrm{E}}\,\mathbf{w}_{\mathrm{D65}}}\right)M_{\mathrm{E}} \tag{34}

(the fraction is the componentwise ratio). The transformation from C to D65 is its inverse. The MEM_{\mathrm{E}} used here is that of the 2° observer and is distinct from MLMSM_{\mathrm{LMS}} of the simulation in §4 (the matrix matched to 10°). As in §1-1, the XYZ of the colors of the image is that of the 2° observer.

7-5. Available formats

The color to read (XYZ of D65) can be displayed in the following formats.

  • Munsell value (§7-2; written in the form "5GY 7/8") and the systematic and traditional color names (§7-2, §7-3).
  • sRGB: the encoded 8-bit values (§2, §3-2). Values outside the gamut are limited to 00–11.
  • XYZ (D65, YY is 11 for white) and xyY (the chromaticity coordinates (x, y)(x,\,y) and YY), defined as in [7].
  • CIELAB and CIELUV (D65 white; defined as in [7]).
  • Oklab (the same transformation as Eq. (23) [14]).

8. Computing the color difference (difference mode)

Difference mode displays, for each pixel of the image, the difference between the original color and the simulated color as brightness. The larger the difference, the brighter the pixel; a pixel with no difference is black. This section describes how the difference is computed.

8-1. Distance

Let q\mathbf{q} be the LMS of the original color and qk\mathbf{q}_k the result of the simulation at strength kk (Eq. (27)). The distance is the Euclidean distance in Oklab space [14]. The conversion to Oklab is the same as the one used for the strength blend (Eqs. (22)–(24)): the original color is clipped to the display gamut by Eq. (22) and then converted to Oklab, and the simulated color uses the Oklab value ok\mathbf{o}_k obtained in the blend.

Δk=∥ ok−o ⁣(C(q))∥2(35)\Delta_k=\left\lVert\,\mathbf{o}_k-\mathbf{o}\!\left(C(\mathbf{q})\right)\right\rVert_2 \tag{35}

Here ∥⋅∥2\lVert\cdot\rVert_2 is the Euclidean distance over the three components (L,a,b)(L,a,b). By Eq. (27), ok=(1−k) o(C(q))+k o(C(qs))\mathbf{o}_k=(1-k)\,\mathbf{o}(C(\mathbf{q}))+k\,\mathbf{o}(C(\mathbf{q}_s)), so the distance is proportional to the strength.

Δk=k ∥ o ⁣(C(qs))−o ⁣(C(q))∥2(36)\Delta_k=k\,\left\lVert\,\mathbf{o}\!\left(C(\mathbf{q}_s)\right)-\mathbf{o}\!\left(C(\mathbf{q})\right)\right\rVert_2 \tag{36}

An implementation therefore only needs to convert the result of the full dichromat simulation (k=1k=1) to Oklab, take the distance, and multiply by kk. Lowering the strength darkens the whole difference image. Because the gamut clip CC is applied before the distance is taken, for colors the display cannot show (vivid blues and purples) only the part of the difference that is visible on the display is counted.

8-2. Mapping to brightness

The distance Δk\Delta_k is divided by an upper limit DD to give the brightness BB (0≤B≤10\le B\le 1).

B=min⁡ ⁣(1, ΔkD)(37)B=\min\!\left(1,\ \frac{\Delta_k}{D}\right) \tag{37}

B=0B=0 is black (no difference); Δk≥D\Delta_k\ge D is white (a difference at or above the limit); in between the mapping is linear. The three output components are BB itself, used directly as an encoded value (the value after the encoding of Eq. (2)).

cout=(B, B, B)(38)\mathbf{c}_{\mathrm{out}}=(B,\,B,\,B) \tag{38}

The user adjusts DD with the strength slider (in difference mode the slider represents the upper limit, not the strength). The slider value ss (0≤s≤10\le s\le 1) maps linearly to the limit.

D=0.01+0.18 s(39)D=0.01+0.18\,s \tag{39}

DD ranges from 0.010.01 to 0.190.19, and the default is D=0.10D=0.10 at s=0.5s=0.5. A smaller DD makes even small differences close to white; a larger DD makes only large differences close to white.

Pixel values are 8-bit, so brightness is displayed in steps of D/255D/255. At D=0.10D=0.10, differences smaller than about 0.00020.0002 become black. Small differences caused by sensor noise also appear when DD is small.

Figure 3 shows an example of the difference image.

Figure 3: An example of the difference image (hue bands, protanope, strength $1$, limit $0.10$)
Figure 3: An example of the difference image (hue bands, protanope, strength 11, limit 0.100.10). The figure shows hue bands (the upper three rows have Oklab lightness 0.800.80, 0.650.65, and 0.500.50 at chroma 0.130.13; the lower three rows have lightness 0.650.65 at chroma 0.030.03, 0.060.06, and 0.100.10; hue runs from 0∘0^{\circ} to 360∘360^{\circ} from left to right), the original image (left), the protanope (P) simulation at strength 11 (middle), and the difference image (right, limit D=0.10D=0.10). The difference image is a gray image whose brightness is BB of Eq. (37): black means no difference, and white means a difference of 0.100.10 or more. The vertical black bands correspond to hues that do not change for protanopes (colors on a confusion line). The lower rows, which have low chroma, show small differences overall.

8-3. Why Oklab

The same space. The color difference is computed in the same Oklab space as the strength blend (§5-3) and the averaging of the read color (§7-1). The conversion matrices (Eq. (24)) and the implementation are shared, so the simulated result and the difference are consistent on one scale.

A simple distance. Oklab has high perceptual uniformity [14], so the Euclidean distance is already close to the perceived difference. CIEDE2000 [19][20] weights hue, chroma, and lightness with a complicated formula (trigonometric functions and case distinctions) that is not suited to per-pixel (shader) processing.

Relation to CIEDE2000. The differences between before and after a simulation are larger than the small color differences that CIEDE2000 was designed for. We measured the correspondence on pixels of a 128-color chart, hue bands, the 267 JIS common colors, Ishihara-like dots, and five photographs (types 1, 2, and 3, strength 1). The table gives the median ΔE00\Delta E_{00} of pixels whose Oklab distance is near each value (±10%), and the median Oklab distance of pixels whose ΔE00\Delta E_{00} is near each value.

Oklab distanceΔE00\Delta E_{00} (median, quartiles)ΔE00\Delta E_{00}Oklab distance (median, quartiles)
0.0514 (13–16)50.013 (0.011–0.018)
0.1022 (20–24)100.028 (0.025–0.035)
0.2032 (29–34)200.082 (0.069–0.097)
——400.238 (0.203–0.260)

The default limit 0.100.10 corresponds to ΔE00≈22\Delta E_{00}\approx 22: a difference that anyone can see when the two colors are placed side by side. To turn differences of ΔE00≥10\Delta E_{00}\ge 10 white, set the limit to about 0.030.03. The correspondence varies with color, and the values above are guides based on the pixel statistics described. In its gamut mapping, the W3C's CSS Color Module Level 4 takes one JND (just noticeable difference) in the OkLCh color space to be 0.020.02, measured by ΔEOK\Delta E_{\mathrm{OK}}, the Euclidean distance over the Oklab (L,a,b)(L,a,b) components (§20.3 of the same document) [21]. The distance in this section (Eq. (35)) is on the same scale as ΔEOK\Delta E_{\mathrm{OK}}. The lower end of the limit, 0.010.01, is half of that.

8-4. Limitations

  • The Euclidean distance in Oklab approximates perceived difference. For large differences the correspondence between distance and appearance varies with color (as does the correspondence in the table). For measuring color differences on a strict scale, use ΔE00\Delta E_{00} or a similar formula.
  • The quantity is the difference between the original and the simulation. It does not measure how easily two colors within the image can be told apart. The simulation is a full dichromat (strength 11) or an interpolation by strength; it is not the appearance of anomalous trichromacy itself (§5).
  • It depends on the display gamut. The distance is measured on colors clipped to the display gamut (Eq. (22)). On a Display P3 screen the clip differs from sRGB, so values change, especially for vivid colors.
  • The displayed brightness has 8-bit steps. Small differences and noise may appear or turn black depending on the limit (§8-2).
  • The difference saturates at the limit. All differences with Δk≥D\Delta_k\ge D are shown as white, so differences in their magnitude cannot be seen.

7-6. Sources of the English color names

Systematic color names (ISCC-NBS). They follow the ISCC-NBS method of designating colors [22]. The space of Munsell hue, value, and chroma is divided into 267 regions (color-name blocks), and each region is given an English systematic color name. The boundaries of the regions are taken from the figures of NBS SP 440 [23].

Traditional color names (TCCA). They follow NBS Research Paper RP1700 [25], which measured 238 colors, the 216 colors of the standard color card of the Textile Color Card Association (TCCA) and the 22 colors of the U.S. Army color card, by spectrophotometry and other methods and gave each card a Munsell renotation. The application uses 178 names: 156 names of TCCA cards, 9 names of Army cards, and the 13 basic terms. The nearest-neighbor search is the same as for the JIS traditional color names (§7-3). The 13 basic terms (such as red and pink) use the colors of ISCC-NBS Level 1 [22], and their colors are the Munsell values of the block centers in Kelly's report [24]. The TCCA and Army cards of the same names are not used.

References

[1] H. Brettel, F. Viénot, and J. D. Mollon, "Computerized simulation of color appearance for dichromats", Journal of the Optical Society of America A, vol. 14, no. 10, pp. 2647–2655, 1997. doi:10.1364/JOSAA.14.002647

[2] K. Asada, "Chromatic Vision Simulator", README of the Android source code (code version 3.3.1; the README itself is headed "Android version 3.0") (appendix: mathematical expressions for color vision simulation), GitHub repository asada0/ChromaticVisionSimulator, 2018, MIT License. https://github.com/asada0/ChromaticVisionSimulator (accessed 25 October 2026)

[3] IEC 61966-2-1:1999, Multimedia systems and equipment — Colour measurement and management — Part 2-1: Colour management — Default RGB colour space — sRGB, International Electrotechnical Commission; and Amendment 1:2003 (published 23 January 2003).

[4] SMPTE EG 432-1:2010, Digital Source Processing — Color Processing for D-Cinema, Society of Motion Picture and Television Engineers, 10 November 2010. doi:10.5594/SMPTE.EG432-1.2010

[5] Apple Inc., "Display P3", Three Component Color Encoding Registry (ICC Registry), International Color Consortium, version 1.0, 9 February 2022. https://registry.color.org/rgb-registry/displayp3 (accessed 22 October 2026). See also Apple Developer Documentation, CGColorSpace.displayP3, https://developer.apple.com/documentation/coregraphics/cgcolorspace/displayp3 (accessed 22 October 2026).

[6] T. Smith and J. Guild, "The C.I.E. colorimetric standards and their use", Transactions of the Optical Society, vol. 33, no. 3, pp. 73–134, 1931–32. doi:10.1088/1475-4878/33/3/301

[7] CIE 15:2004, Colorimetry, 3rd ed., Commission Internationale de l'Éclairage, 2004, ISBN 978-3-901906-33-6 (since superseded by CIE 015:2018).

[8] G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulae, 2nd ed., John Wiley & Sons, 1982, ISBN 978-0-471-02106-3.

[9] JIS Z 8701:1999, Colour specification — The CIE 1931 standard colorimetric system and the CIE 1964 supplementary standard colorimetric system (in Japanese: 色の表示方法 — XYZ 表色系及び X10Y10Z10 表色系), Japanese Standards Association, 1999. Table 2 (spectral chromaticity coordinates of the X10Y10Z10 system). Note: a secondary source states that this standard was withdrawn when JIS Z 8781-3 was established in 2016 (not confirmed against the JISC original). The values of Table 2 used here were checked against the JIS Handbook 61 (Color).

[10] R. W. G. Hunt and M. R. Pointer, "A colour-appearance transform for the CIE 1931 standard colorimetric observer", Color Research & Application, vol. 10, no. 3, pp. 165–179, 1985. doi:10.1002/col.5080100306

[11] M. D. Fairchild, Color Appearance Models, 3rd ed., John Wiley & Sons, 2013, ISBN 978-1-119-96703-3. doi:10.1002/9781118653128

[12] C. Poynton, Digital Video and HD: Algorithms and Interfaces, 2nd ed., Morgan Kaufmann, 2012, ISBN 978-0-12-391926-7.

[13] Colour & Vision Research Laboratory, UCL Institute of Ophthalmology, "CIE 1931 2-deg XYZ color matching functions (ciexyz31_1.csv, 1 nm steps)" and "CIE 1964 10-deg XYZ color matching functions (ciexyz64_1.csv, 1 nm steps)", database of the Colour & Vision Research Laboratory, http://cvrl.ioo.ucl.ac.uk/cmfs.htm (accessed 26 October 2026).

[14] B. Ottosson, "A perceptual color space for image processing", blog post, 23 December 2020, https://bottosson.github.io/posts/oklab/ (accessed 26 October 2026).

[15] JIS Z 8102:2001, 物体色の色名(Names of non-luminous object colours), 日本規格協会(Japanese Standards Association), 2001. Note: public sources give 269 traditional color names. This document uses the 267 of them that are defined by Munsell values (the content of the remaining names was not confirmed against the original standard).

[16] JIS Z 8721:1993, 色の表示方法-三属性による表示(Colour specification — Specification according to their three attributes), 日本規格協会(Japanese Standards Association), 1993. Note: the coefficients of Eq. (32) are the values of this standard.

[17] ASTM D1535-14 (2023), Standard Practice for Specifying Color by the Munsell System, ASTM International, reapproved 2023. https://store.astm.org/d1535-14r23.html (accessed 26 October 2026) Note: Eq. (32) uses the coefficients of [16]. The coefficients of this standard given by a secondary source (1.1914, −0.22533, 0.23352, −0.020484, 0.00081939) differ in the last digit; the difference is at most 0.003 in Y (percent scale). The original texts of [16] and [17] were not read.

[18] S. M. Newhall, D. Nickerson, and D. B. Judd, "Final report of the O.S.A. subcommittee on the spacing of the Munsell colors", Journal of the Optical Society of America, vol. 33, no. 7, pp. 385–418, 1943. doi:10.1364/JOSA.33.000385

[19] CIE 142:2001, Improvement to industrial colour-difference evaluation, Commission Internationale de l'Éclairage, Vienna, 2001, ISBN 978-3-901906-08-4.

[20] G. Sharma, W. Wu, and E. N. Dalal, "The CIEDE2000 color-difference formula: Implementation notes, supplementary test data, and mathematical observations", Color Research & Application, vol. 30, no. 1, pp. 21–30, 2005. doi:10.1002/col.20070

[21] World Wide Web Consortium (W3C), "CSS Color Module Level 4", Candidate Recommendation Draft, 27 October 2026, §14.2.1 (Gamut Mapping: "For the OkLCh color space, one JND is an OkLCh difference of 0.02") and §20.3 (ΔEOK, defined as the Euclidean distance in Oklab color space). https://www.w3.org/TR/css-color-4/ (accessed 28 October 2026)

[22] K. L. Kelly and D. B. Judd, "The ISCC-NBS Method of Designating Colors and a Dictionary of Color Names", NBS Circular 553, National Bureau of Standards, 1955.

[23] K. L. Kelly and D. B. Judd, "Color: Universal Language and Dictionary of Names", NBS Special Publication 440, National Bureau of Standards, 1976. doi:10.6028/NBS.SP.440

[24] K. L. Kelly, "Central Notations for the Revised ISCC-NBS Color-Name Blocks", Journal of Research of the National Bureau of Standards, vol. 61, no. 5, pp. 427–431, 1958 (Research Paper 2911).

[25] G. Reimann, D. B. Judd, and H. J. Keegan, "Spectrophotometric and Colorimetric Determination of the Colors of the TCCA Standard Color Cards", Journal of Research of the National Bureau of Standards, vol. 36, no. 3, p. 209, 1946 (Research Paper RP1700).