colour.difference.delta_E_CMC

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

Returns the difference \(\Delta E_{CMC}\) 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_{CMC}\).

Return type:

numeric or ndarray

Notes

Domain Scale - Reference Scale - 1
Lab_1

L_1 : [0, 100]

a_1 : [-100, 100]

b_1 : [-100, 100]

L_1 : [0, 1]

a_1 : [-1, 1]

b_1 : [-1, 1]

Lab_2

L_2 : [0, 100]

a_2 : [-100, 100]

b_2 : [-100, 100]

L_2 : [0, 1]

a_2 : [-1, 1]

b_2 : [-1, 1]

References

[Lindbloom2009f]

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)  # doctest: +ELLIPSIS
172.7047712...