HOME

TheInfoList



OR:

In
color science Color science is the scientific study of color including lighting and optics; measurement of light and color; the physiology, psychophysics, and modeling of color vision; and color reproduction. History Organizations * International Commiss ...
, color difference or color distance is the separation between two
color Color (American English) or colour (British English) is the visual perceptual property deriving from the spectrum of light interacting with the photoreceptor cells of the eyes. Color categories and physical specifications of color are associ ...
s. This
metric Metric or metrical may refer to: * Metric system, an internationally adopted decimal system of measurement * An adjective indicating relation to measurement in general, or a noun describing a specific type of measurement Mathematics In mathema ...
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 mathematics, the Euclidean distance between two points in Euclidean space is the length of a line segment between the two points. It can be calculated from the Cartesian coordinates of the points using the Pythagorean theorem, therefor ...
in a device-independent
color space A color space is a specific organization of colors. In combination with color profiling supported by various physical devices, it supports reproducible representations of colorwhether such representation entails an analog or a digital represent ...
.


Euclidean


sRGB

As most definitions of color difference are distances within a
color space A color space is a specific organization of colors. In combination with color profiling supported by various physical devices, it supports reproducible representations of colorwhether such representation entails an analog or a digital represent ...
, the standard means of determining distances is the Euclidean distance. If one presently has an RGB (red, green, blue) tuple and wishes to find the color difference, computationally one of the easiest is to consider ''R'', ''G'', ''B'' linear dimensions defining the color space. \text = \sqrt. When the result should be computationally simple as well, it is often acceptable to remove the square root and simply use \text^2 = (R_2 - R_1)^2 + (G_2 - G_1)^2 + (B_2 - B_1)^2. This will work in cases when a single color WAS 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 In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
of the color distances. There have been many attempts to weigh RGB values to better fit human perception, where the components are commonly weighted (red 30%, green 59%, and blue 11%), 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 sRGB is a standard RGB (red, green, blue) color space that HP and Microsoft created cooperatively in 1996 to use on monitors, printers, and the World Wide Web. It was subsequently standardized by the International Electrotechnical Commission ( ...
, using a color range of 0–255): \begin \sqrt, & \bar R < 128, \\ \sqrt & \text, \end where: \begin \Delta R &= R_1 - R_2, \\ \Delta G &= G_1 - G_2, \\ \Delta B &= B_1 - B_2, \\ \bar R &= \frac12 (R_1 + R_2). \end One of the better low-cost approximations, sometimes called "redmean", combines the two cases smoothly: \begin \bar r &= \frac12 (R_1 + R_2), \\ \Delta C &= \sqrt. \end There are a number of color distance formulae that attempt to use color spaces like HSV with the hue 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.


Uniform color spaces

CIELAB and CIELUV are relatively perceptually uniform spaces and they have been used as spaces for Euclidean measures of color difference. The CIELAB version is known as CIE76. However, the non-uniformity of these spaces were later discovered, leading to the creation of more complex formulae. 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.


Rec. ITU-R BT.2124 or Δ''E''ITP

In 2019 a new standard for WCG and HDR was introduced, since CIEDE2000 was not adequate for it: CIEDE2000 is not reliable below 1 cd/m2 and has not been verified above 100 cd/m2; in addition, even in BT.709 blue primary CIEDE2000 is underpredicting the error. Δ''E''ITP is scaled so that a value of 1 indicates the potential of a just noticeable color difference. The Δ''E''ITP color difference metric is derived from display referenced ICTCP, but XYZ is also available in the standard. The formula is a simply scaled Euclidean distance: \Delta E_\text = 720 \sqrt, where the components of this "ITP" is given by : ''I'' = ''I'', : ''T'' = 0.5 ''C''''T'', : ''P'' = ''C''''P''.


Other geometric constructions

The Euclidean measure is known to work poorly on large color distances (i.e. more than 10 units in most systems). A hybrid approach where a
taxicab distance A taxicab geometry or a Manhattan geometry is a geometry whose usual distance function or metric of Euclidean geometry is replaced by a new metric in which the distance between two points is the sum of the absolute differences of their Cartesian co ...
is used between the lightness and the chroma plane, \Delta E_ = \sqrt + \left, L_2-L_1 \, is shown to work better on CIELAB.


CIELAB ΔE*

The
International Commission on Illumination The International Commission on Illumination (usually abbreviated CIE for its French name, Commission internationale de l'éclairage) is the international authority on light, illumination, colour, and colour spaces. It was established in 1913 a ...
(CIE) calls their distance metric (or, inaccurately, , , or "Delta E") where
delta Delta commonly refers to: * Delta (letter) (Δ or δ), a letter of the Greek alphabet * River delta, at a river mouth * D (NATO phonetic alphabet: "Delta") * Delta Air Lines, US * Delta variant of SARS-CoV-2 that causes COVID-19 Delta may also re ...
is a
Greek letter The Greek alphabet has been used to write the Greek language since the late 9th or early 8th century BCE. It is derived from the earlier Phoenician alphabet, and was the earliest known alphabetic script to have distinct letters for vowels as w ...
often used to denote difference, and E stands for ''Empfindung''; German for "sensation". Use of this term can be traced back to
Hermann von Helmholtz Hermann Ludwig Ferdinand von Helmholtz (31 August 1821 – 8 September 1894) was a German physicist and physician who made significant contributions in several scientific fields, particularly hydrodynamic stability. The Helmholtz Association, ...
and
Ewald Hering Karl Ewald Konstantin Hering (5 August 1834 – 26 January 1918) was a German physiologist who did much research into color vision, binocular perception and eye movements. He proposed opponent color theory in 1892. Born in Alt-Gersdorf, Ki ...
. Perceptual non-uniformities in the underlying
CIELAB The CIELAB color space, also referred to as ''L*a*b*'' , is a color space defined by the International Commission on Illumination (abbreviated CIE) in 1976. (Referring to CIELAB as "Lab" without asterisks should be avoided to prevent confusion ...
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 In the branch of experimental psychology focused on sense, sensation, and perception, which is called psychophysics, a just-noticeable difference or JND is the amount something must be changed in order for a difference to be noticeable, detectable ...
" (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. 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.


CIE76

The 1976 formula is the first formula that related a measured color difference to a known set of CIELAB coordinates. This formula has been succeeded by the 1994 and 2000 formulas because the CIELAB space turned out to be not as perceptually uniform as intended, especially in the saturated regions. This means that this formula rates these colors too highly as opposed to other colors. Given two colors in
CIELAB color space The CIELAB color space, also referred to as ''L*a*b*'' , is a color space defined by the International Commission on Illumination (abbreviated CIE) in 1976. (Referring to CIELAB as "Lab" without asterisks should be avoided to prevent confusion ...
, (,,) and (,,), the CIE76 color difference formula is defined as: \Delta E_^* = \sqrt. \Delta E_^* \approx 2.3 corresponds to a JND (just noticeable difference).


CIE94

The 1976 definition was extended to address perceptual non-uniformities, while retaining the CIELAB color space, by the introduction of application-specific weights derived from an automotive paint test's tolerance data. Δ''E'' (1994) is defined in the L*C*h* color space with differences in lightness, chroma and hue calculated from L*a*b* coordinates. Given a reference color (L^*_1, a^*_1, b^*_1) and another color (L^*_2, a^*_2, b^*_2), the difference is \Delta E_^* = \sqrt, where \begin \Delta L^* &= L^*_1 - L^*_2, \\ C^*_1 &= \sqrt, \\ C^*_2 &= \sqrt, \\ \Delta C^*_ &= C^*_1 - C^*_2, \\ \Delta H^*_ &= \sqrt = \sqrt, \\ \Delta a^* &= a^*_1 - a^*_2, \\ \Delta b^* &= b^*_1 - b^*_2, \\ S_L &= 1, \\ S_C &= 1 + K_1 C^*_1, \\ S_H &= 1 + K_2 C^*_1, \\ \end and where ''kC'' and ''kH'' are usually both unity, and the weighting factors ''kL'', ''K''1 and ''K''2 depend on the application: : Geometrically, the quantity \Delta H^*_ corresponds to the arithmetic mean of the chord lengths of the equal chroma circles of the two colors.


CIEDE2000

Since the 1994 definition did not adequately resolve the
perceptual uniformity In color science, color difference or color distance is the separation between two colors. This metric allows quantified examination of a notion that formerly could only be described with adjectives. Quantification of these properties is of great ...
issue, the CIE refined their definition, adding five corrections: * A hue rotation term (RT), to deal with the problematic blue region (hue angles in the neighborhood of 275°): * Compensation for neutral colors (the primed values in the L*C*h differences) * Compensation for lightness (SL) * Compensation for chroma (SC) * Compensation for hue (SH) \Delta E_^* = \sqrt ::Note: The formulae below should use degrees rather than radians; the issue is significant for ''RT''. ::The ''kL'', ''kC'', and ''kH'' are usually unity. \Delta L^\prime = L^*_2 - L^*_1 \bar = \frac \quad \bar = \frac a_1^\prime = a_1^* + \frac \left( 1 - \sqrt \right) \quad a_2^\prime = a_2^* + \frac \left( 1 - \sqrt \right) \bar^\prime = \frac \mbox \Delta=C'_2-C'_1 \quad \mbox C_1^\prime = \sqrt \quad C_2^\prime = \sqrt \quad h_1^\prime=\text (b_1^*, a_1^\prime) \mod 360^\circ, \quad h_2^\prime=\text (b_2^*, a_2^\prime) \mod 360^\circ :: Note: The inverse tangent (tan−1) can be computed using a common library routine atan2(b, a′) which usually has a range from −π to π radians; color specifications are given in 0 to 360 degrees, so some adjustment is needed. The inverse tangent is indeterminate if both ''a′'' and ''b'' are zero (which also means that the corresponding ''C′'' is zero); in that case, set the hue angle to zero. See . \Delta h' = \begin h_2^\prime - h_1^\prime & \left, h_1^\prime - h_2^\prime \ \leq 180^\circ \\ h_2^\prime - h_1^\prime + 360^\circ & \left, h_1^\prime - h_2^\prime \ > 180^\circ, h_2^\prime \leq h_1^\prime \\ h_2^\prime - h_1^\prime - 360^\circ & \left, h_1^\prime - h_2^\prime \ > 180^\circ, h_2^\prime > h_1^\prime \end :: Note: When either ''C′''1 or ''C′''2 is zero, then Δh′ is irrelevant and may be set to zero. See . \Delta H^\prime = 2 \sqrt \sin (\Delta h^\prime/2), \quad \bar^\prime=\begin (h_1^\prime + h_2^\prime)/2 & \left, h_1^\prime - h_2^\prime \ \leq 180^\circ \\ (h_1^\prime + h_2^\prime + 360^\circ)/2 & \left, h_1^\prime - h_2^\prime \ > 180^\circ, h_1^\prime + h_2^\prime < 360^\circ \\ (h_1^\prime + h_2^\prime - 360^\circ)/2 & \left, h_1^\prime - h_2^\prime \ > 180^\circ, h_1^\prime + h_2^\prime \geq 360^\circ \end :: Note: When either ''C′''1 or ''C′''2 is zero, then ′ is ''h′''1+''h′''2 (no divide by 2; essentially, if one angle is indeterminate, then use the other angle as the average; relies on indeterminate angle being set to zero). See stating most implementations on the internet at the time had "an error in the computation of average hue". T = 1 - 0.17 \cos ( \bar^\prime - 30^\circ ) + 0.24 \cos (2\bar^\prime) + 0.32 \cos (3\bar^\prime + 6^\circ ) - 0.20 \cos (4\bar^\prime - 63^\circ) S_L = 1 + \frac \quad S_C = 1+0.045 \bar^\prime \quad S_H = 1+0.015 \bar^\prime T R_T = -2 \sqrt \sin \left 60^\circ_\cdot_\exp_\left(_-\left[_\frac_\right2_\right)_\right.html" ;"title="\frac_\right.html" ;"title="60^\circ \cdot \exp \left( -\left[ \frac \right">60^\circ \cdot \exp \left( -\left[ \frac \right2 \right) \right">\frac_\right.html" ;"title="60^\circ \cdot \exp \left( -\left[ \frac \right">60^\circ \cdot \exp \left( -\left[ \frac \right2 \right) \right/math>


CMC l:c (1984)

In 1984, the Colour Measurement Committee of the Society of Dyers and Colourists defined a difference measure, also based on the L*C*h color model. Named after the developing committee, their metric is called CMC l:c. The
quasimetric In mathematics, a metric space is a set together with a notion of ''distance'' between its elements, usually called points. The distance is measured by a function called a metric or distance function. Metric spaces are the most general settin ...
has two parameters: lightness (l) and chroma (c), allowing the users to weight the difference based on the ratio of l:c that is deemed appropriate for the application. Commonly used values are 2:1 for acceptability and 1:1 for the threshold of imperceptibility. The distance of a color (L^*_2,C^*_2,h_2) to a reference (L^*_1,C^*_1,h_1) is: \Delta E^*_ = \sqrt S_L=\begin 0.511 & L^*_1 < 16 \\ \frac & L^*_1 \geq 16 \end \quad S_C=\frac + 0.638 \quad S_H=S_C (FT+1-F) F = \sqrt \quad T=\begin 0.56 + , 0.2 \cos (h_1+168^\circ), & 164^\circ \leq h_1 \leq 345^\circ \\ 0.36 + , 0.4 \cos (h_1+35^\circ) , & \mbox \end CMC l:c is designed to be used with D65 and the CIE Supplementary Observer. As with CIE94, this formula defines a
quasimetric In mathematics, a metric space is a set together with a notion of ''distance'' between its elements, usually called points. The distance is measured by a function called a metric or distance function. Metric spaces are the most general settin ...
because it violates symmetry: parameter T is based on the hue of the reference h_1 alone.


Tolerance

Tolerancing concerns the question "What is a set of colors that are imperceptibly/acceptably close to a given reference?" If the distance measure is ''perceptually uniform'', then the answer is simply "the set of points whose distance to the reference is less than the just-noticeable-difference (JND) threshold". This requires a perceptually uniform metric in order for the threshold to be constant throughout the
gamut In color reproduction, including computer graphics and photography, the gamut, or color gamut , is a certain ''complete subset'' of colors. The most common usage refers to the subset of colors which can be accurately represented in a given circ ...
(range of colors). Otherwise, the threshold will be a function of the reference color—cumbersome as a practical guide. In the
CIE 1931 color space The CIE 1931 color spaces are the first defined quantitative links between distributions of wavelengths in the electromagnetic visible spectrum, and physiologically perceived colors in human color vision. The mathematical relationships that defin ...
, for example, the tolerance contours are defined by the
MacAdam ellipse In the study of color vision, a MacAdam ellipse is a region on a chromaticity diagram which contains all colors which are indistinguishable, to the average human eye, from the color at the center of the ellipse. The contour of the ellipse therefor ...
, which holds L* (lightness) fixed. As can be observed on the adjacent diagram, the
ellipse In mathematics, an ellipse is a plane curve surrounding two focus (geometry), focal points, such that for all points on the curve, the sum of the two distances to the focal points is a constant. It generalizes a circle, which is the special ty ...
s denoting the tolerance contours vary in size. It is partly this non-uniformity that led to the creation of
CIELUV In colorimetry, the CIE 1976 ''L''*, ''u''*, ''v''* color space, commonly known by its abbreviation CIELUV, is a color space adopted by the International Commission on Illumination (CIE) in 1976, as a simple-to-compute transformation of the 1931 CI ...
and
CIELAB The CIELAB color space, also referred to as ''L*a*b*'' , is a color space defined by the International Commission on Illumination (abbreviated CIE) in 1976. (Referring to CIELAB as "Lab" without asterisks should be avoided to prevent confusion ...
. More generally, if the lightness is allowed to vary, then we find the tolerance set to be
ellipsoid An ellipsoid is a surface that may be obtained from a sphere by deforming it by means of directional scalings, or more generally, of an affine transformation. An ellipsoid is a quadric surface;  that is, a surface that may be defined as the ...
al. Increasing the weighting factor in the aforementioned distance expressions has the effect of increasing the size of the ellipsoid along the respective axis.


See also

*
CIELAB The CIELAB color space, also referred to as ''L*a*b*'' , is a color space defined by the International Commission on Illumination (abbreviated CIE) in 1976. (Referring to CIELAB as "Lab" without asterisks should be avoided to prevent confusion ...
* Color coding technology for visualization


Footnotes


Notes


References


Further reading

* * *


External links


Bruce Lindbloom's color difference calculator
Uses all CIELAB metrics defined herein.
The CIEDE2000 Color-Difference Formula
by Gaurav Sharma. Implementations in MATLAB and Excel. {{Color topics Color space Visual perception Color vision Distance