colour.difference.delta_E_CMC

colour.difference.delta_E_CMC(Lab_1, Lab_2, l=2, c=1)[source]

Returns the difference \(\Delta E_{ab}\) between two given CIE L*a*b* colourspace arrays using Colour Measurement Committee recommendation.

The quasimetric has two parameters: Lightness (l) and chroma (c), allowing the users to weight the difference based on the ratio of l:c. Commonly used values are 2:1 for acceptability and 1:1 for the threshold of imperceptibility.

Parameters:
  • Lab_1 (array_like) – CIE L*a*b* colourspace array 1.
  • Lab_2 (array_like) – CIE L*a*b* colourspace array 2.
  • l (numeric, optional) – Lightness weighting factor.
  • c (numeric, optional) – Chroma weighting factor.
Returns:

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

Return type:

numeric or ndarray

References

Examples

>>> Lab_1 = np.array([100.00000000, 21.57210357, 272.22819350])
>>> Lab_2 = np.array([100.00000000, 426.67945353, 72.39590835])
>>> delta_E_CMC(Lab_1, Lab_2)  
172.7047712...