In color science, color difference or color distance is the separation between two . This metric space allows quantified examination of a notion that formerly could only be described with adjectives. Quantification of these properties is of great importance to those whose work is color-critical. Common definitions make use of the Euclidean distance in a device-independent color space.
A very simple example can be given between the two colors with RGB values (0, 64, 0) () and (255, 64, 0) (): their distance is 255. Going from there to (255, 64, 128) () is a distance of 128.
When we wish to calculate distance from the first point to the third point (i.e. changing more than one of the color values), we can do this:
When the result should be computationally simple as well, it is often acceptable to remove the square root and simply use
This will work in cases when a single color is to be compared to a single color and the need is to simply know whether a distance is greater. If these squared color distances are summed, such a metric effectively becomes the variance of the color distances.
There have been many attempts to weigh RGB values, however these are demonstrably worse at color determinations and are properly the contributions to the brightness of these colors, rather than to the degree to which human vision has less tolerance for these colors. The closer approximations would be more properly (for non-linear sRGB, using a color range of 0–255):
where:
One of the better low-cost approximations, sometimes called "redmean", combines the two cases smoothly:
There are a number of color distance formulae that attempt to use color spaces like HSV or HSL with the hue represented as a circle, placing the various colors within a three-dimensional space of either a cylinder or cone, but most of these are just modifications of RGB; without accounting for differences in human color perception, they will tend to be on par with a simple Euclidean metric.
A uniform color space is supposed to make a simple measure of color difference, usually Euclidean, "just work". Color spaces that improve on this issue include CAM02-UCS, CAM16-UCS, and Jzazbz.
where the components of this "ITP" is given by
Perceptual non-uniformities in the underlying CIELAB color space have led to the CIE refining their definition over the years, leading to the superior (as recommended by the CIE) 1994 and 2000 formulas. These non-uniformities are important because the human eye is more sensitive to certain colors than others. CIELAB metric is used to define color tolerance of CMYK solids. A good metric should take this into account in order for the notion of a "just noticeable difference" (JND) to have meaning. Otherwise, a certain may be insignificant between two colors in one part of the color space while being significant in some other part. Evaluation of the CIE Color Difference Formulas
All formulae are originally designed to have the difference of 1.0 stand for a JND. This convention is generally followed by other perceptual distance functions such as the aforementioned . However, further experimentation may invalidate this design assumption, the revision of CIE76 JND to 2.3 being an example.
Given two colors in CIELAB color space, and , the CIE76 color difference formula is defined as:
corresponds to a JND (just noticeable difference).
The distance of a color to a reference is:
CMC l:c is designed to be used with D65 and the CIE Supplementary Observer.
As with the CMC I:c, Δ E (1994) is defined in the L*C*h* color space and likewise violates symmetry, therefore defining a quasimetric. Given a reference color both depend on only.}} and another color , the difference is
where
CIEDE 2000 is not mathematically continuous. The discontinuity stems from the discontinuity of the mean hue and the hue difference . The maximum discontinuity happens when the hues of two sample colors are about 180° apart, and is usually small relative to ΔE (less than 4%). There is also a negligible amount of discontinuity from hue rollover.
Sharma, Wu, and Dalal have provided additional notes on the mathematics and implementation of the formulae.
In the CIE 1931 color space, for example, the tolerance contours are defined by the MacAdam ellipse, which holds L* (lightness) fixed. As can be observed on the adjacent diagram, the denoting the tolerance contours vary in size. It is partly this non-uniformity that led to the creation of CIELUV and CIELAB.
More generally, if the lightness is allowed to vary, then we find the tolerance set to be . Increasing the weighting factor in the aforementioned distance expressions has the effect of increasing the size of the ellipsoid along the respective axis.
The definition of "acceptably close" also depends on the industrial requirements and practicality. In the automotive industry the is rather stringent, often less than 0.5 under D65/10. In printing, the typical limit is 2.0 under D50, though some processes require up to 5.0.
Uniform color spaces
Rec. ITU-R BT.2124 or ΔEITP
Other geometric constructions
CIELAB ΔE*
CIE76
CMC l:c (1984)
CIE94
Tolerance
See also
Footnotes
Notes
Further reading
External links
|
|