colour.delta_E

colour.delta_E(a, b, method='CIE 2000', **kwargs)[source]

Returns the difference \(\Delta E_{ab}\) between two given CIE L*a*b* or \(J'a'b'\) colourspace arrays using given method.

Parameters:
  • a (array_like) – CIE L*a*b* or \(J'a'b'\) colourspace array \(a\).
  • b (array_like) – CIE L*a*b* or \(J'a'b'\) colourspace array \(b\).
  • method (unicode, optional) – {‘CIE 2000’, ‘CIE 1976’, ‘CIE 1994’, ‘CMC’, ‘CAM02-LCD’, ‘CAM02-SCD’, ‘CAM02-UCS’, ‘CAM16-LCD’, ‘CAM16-SCD’, ‘CAM16-UCS’, ‘DIN99’} Computation method.
Other Parameters:
 
Returns:

Colour difference \(\Delta E_{ab}\).

Return type:

numeric or ndarray

References

[ASTMInternational2007], [Li2017], [Lindbloom2003c], [Lindbloom2011a], [Lindbloom2009e], [Lindbloom2009f], [Luo2006b], [Melgosa2013b], [Wikipedia2008b]

Examples

>>> import numpy as np
>>> a = np.array([100.00000000, 21.57210357, 272.22819350])
>>> b = np.array([100.00000000, 426.67945353, 72.39590835])
>>> delta_E(a, b)  # doctest: +ELLIPSIS
94.0356490...
>>> delta_E(a, b, method='CIE 2000')  # doctest: +ELLIPSIS
94.0356490...
>>> delta_E(a, b, method='CIE 1976')  # doctest: +ELLIPSIS
451.7133019...
>>> delta_E(a, b, method='CIE 1994')  # doctest: +ELLIPSIS
83.7792255...
>>> delta_E(a, b, method='CIE 1994', textiles=False)
... # doctest: +ELLIPSIS
83.7792255...
>>> delta_E(a, b, method='DIN99')  # doctest: +ELLIPSIS
66.1119282...
>>> a = np.array([54.90433134, -0.08450395, -0.06854831])
>>> b = np.array([54.90433134, -0.08442362, -0.06848314])
>>> delta_E(a, b, method='CAM02-UCS')  # doctest: +ELLIPSIS
0.0001034...
>>> delta_E(a, b, method='CAM16-LCD')  # doctest: +ELLIPSIS
0.0001034...