## Color difference (error) formulas

We use color difference metrics to quantify the perceptual difference between colors. All of these metrics are based on L*a*b* color space, which was designed to be perceptually uniform. If it were truly uniform, perceptual color differences could be determined by the Euclidian distance between colors expressed as L*a*b* values (CIE 1976 metrics):

ΔE*ab = ( (L*2-L*1)2 + (a*2-a*1)2 + (b*2-b*1)2 )1/2 = (ΔL*2 + Δa*2 + Δb*2 )1/2

We are often interested in differences between color only, omitting luminance.

ΔC*ab = ((a*2-a*1)2 + (b*2-b*1)2 )1/2 = (Δa*2 + Δb*2 )1/2

However, L*a*b* (sometimes referred to as CIE 1976) is not nearly as uniform as its designers intended. In particular, the eye is a good deal less sensitive to differences in chroma (c* = (a*2 + b*2 )1/2 ; i.e., intensity of color) for strongly chromatic colors than it is to hues (hue angle = h* = arctan(b/a) ). To correct this deficiency several color metric formulas have been proposed.

• CIE 1994: ΔE*94 , which includes Luminance L*, and ΔC*94 , which omits L*.
• CMC: ΔE*CMC , which includes Luminance L*, and ΔC*CMC , which omits L*. Widely used in the textile industry for matching bolts of cloth.
• CIEDE2000: ΔE00 , which includes Luminance L*, and ΔC00 , which omits L*. This is the emerging standard as well as the most accurate color difference metric. Its acceptance has been slowed by the complexity of its formula. Although it is less familiar that the other equations, it is the best choice in the long run.

Whichever metric you choose, remember that they give different numbers. It is important to be consistent and always specify which measurement you are using.

The Hue and Chroma differences, ΔH* and ΔC*, are of interest for their own sake and because they are used in the CIE 1994 and CMC color difference formulas, below.

ΔH* = (E*ab )2 - (ΔL*)2 - (ΔC*)2 )1/2 (Hue difference ; DCIH (5.36) )

Δc* = ( a1*2 + b1*2 )1/2( a2*2 + b2*2 )1/2 (Chroma difference)

Δh* = 180/π (arctan( b1* / a1*) – arctan( b2* / a2*) ) (Hue angle difference ; see online Errata )
Δh* = Δh* - 360 if Δh* > 200 ; Δh* = Δh* + 360 if Δh* < -200

Δh* = 0 where the hue angle is poorly defined: L* < 2 ; max(a1 , b1*) < 2 ; max(a2 , b2*) < 2 ;

### Absolute differences (including luminance)

CIE 1976

The L*a*b* color space was designed to be relatively perceptually uniform. That means that perceptible color difference is approximately equal to the Euclidean distance between L*a*b* values. For colors {L1*, a1*, b1*} and {L2*, a2*, b2*}, where ΔL* = L2* - L1*, Δa* = a2* - a1*, and Δb* = b2* - b1*,

ΔE*ab = ( ( ΔL*)2 + (Δa*)2 + (Δb*)2 )1/2 (DCIH (1.42, 5.35); (...)1/2 denotes square root of (...) ).

Although ΔE*ab is relatively simple to calculate and understand, it's not very accurate especially for strongly saturated colors. L*a*b* is not as perceptually uniform as its designers intended. For example, for saturated colors, which have large chroma values (C* = ( a*2 + b*2 )1/2 ), the eye is less sensitive to changes in chroma than to corresponding changes for Hue (ΔH* = (E*ab)2 - (ΔL*)2 - (ΔC*)2 )1/2 ) or Luminance (ΔL*). To address this issue, several additional color difference formulas have been established. In these formulas, just-noticeable differences (JNDs) are represented by ellipsoids rather than circles.

CIE 1994

The CIE-94 color difference formula, ΔE*94, provides a better measure of perceived color difference.

ΔE*94 = (L*)2 + (ΔC*/SC )2 + (ΔH*/SH )2 )1/2 (DCIH (5.37); omitting constants set to 1 ), where

SC = 1 + 0.045 C* ; SH = 1 + 0.015 C* (DCIH (1.53, 1.54) )

[ C* = ( ( a1*2 + b1*2 )1/2 ( a2*2 + b2*2 )1/2 )1/2 (the geometrical mean chroma) gives symmetrical results for colors 1 and 2. However, when one of the colors (denoted by subscript s) is the standard, the chroma of the standard, Cs* = ( as*2 + bs*2 )1/2, is preferred for calculating SC and SH. The asymmetrical equation is used by Bruce Lindbloom.]

 CMC The CMC color difference formula is widely used by the textile industry to match bolts of cloth. Although it's less familiar to photographers than the CIE 1976 geometric distance ΔE*ab , it's probably the best of the measurement metrics. It is slightly asymmetrical: subscript s denotes the standard (reference) measurement. CMC is the Colour Measurement Committee of the Society of Dyers and Colourists (UK).

ΔE*CMC(l,c) = (L*/lSL)2 + (ΔC*/cSC )2 + (ΔH*/SH )2 )1/2 (DCIH (5.37) ), where

(That's the lowercase letter l in (l,c) and the denominator of (ΔL*/lSL)2.) ΔE*CMC(1,1) (l = c = 1) is used for graphic arts perceptibility measurements. l = 2 is used in the textile industry for acceptability of fabric matching. For now Imatest displays ΔE*CMC(1,1).

SL = 0.040975 Ls* / (1+0.01765 Ls*) ; Ls* ≥ 16 (DCIH (1.48) )

= 0.511 ; Ls* < 16

SC = 0.0638 cs* / (1+0.0131 cs* ) + 0.638 ; SH = SC (TCMC FCMC + 1 - FCMC ) (DCIH (1.49, 1.50) )

FCMC = ( ( cs*)4 / ( ( cs*)4 + 1900 ) )1/2 (DCIH (1.51);

TCMC = 0.56 + | 0.2 cos(hs* + 168°) | 164° ≤ hs* ≤ 345° (DCIH (1.52) )

= 0.36 + | 0.4 cos(hs* + 35 °) | otherwise

CIEDE2000

The CIEDE2000 formulas (ΔEoo and ΔCoo ) are the upcoming standard, and may be regarded as more accurate than the previous formulas. We omit the equations here because they are described very well on Gaurav Sharma's CIEDE2000 Color-Difference Formula web page. Default values of 1 are used for parameters kL, kC, and kH.

At the time of this writing (February 2008) the CIE 1976 color difference metrics (ΔE*ab...) are still the most familiar. CIE 1994 is more accurate and robust, and retains a relatively simple equation. ΔE*CMC is more complex but widely used in the textile industry. The complexity of the CIEDE2000 equations (DCIH, section 1.7.4, pp. 34-40) has slowed their widespread adoption, but they are on their way to becomming the accepted standard. For the long run, CIEDE2000 color difference metrics are the best choice.

### Color differences that omit luminance difference

Photographic papers, especially matte papers, are not able to reproduce deep gray and black tones well. This results in a large density difference that has a strong effect on ΔE*ab, ΔE*94, and ΔE*94. It can be useful to look at color errors independently of density error. Color differences that omit ΔL* include

ΔC*ab = (a*)2 + (Δb*)2 )1/2

ΔC*94 = (c*/SC )2 + (ΔH*/SH )2 )1/2

ΔC*CMC = (c*/SC )2 + (ΔH*/SH )2 )1/2

These formulas don't entirely remove the effects of exposure error since L* is affected by exposure, but they reduce it to a manageable level.