Delta E (CMC)
The color difference method of the Color Measurement Committee (the CMC) is a model using two parameters l and c,
typically expressed as CMC(l:c). Commonly used values for acceptability are CMC(2:1) and for perceptibility are CMC(1:1).
The color difference, or ΔE, between a sample color L2a2b2 and a reference color L1a1b1 is:
- H1 is in degrees, not radians.
- If H1 < 0°, add 360° to it.
- In computing H1, be careful with the inverse tangent since a could be zero. Instead, use special
math functions to do this. In both the Standard C library and Java, this function is called atan2. In Microsoft Excel,
it is called ATAN2. These special functions will compute the proper inverse tangents without needing to worry about
"divide by zero" conditions. Additionally, atan2 will also handle the quadrants for you.