colour.difference.delta_E_CMC#

colour.difference.delta_E_CMC(Lab_1: Domain100, Lab_2: Domain100, l: float = 2, c: float = 1, *, additional_data: Literal[False] = False) NDArrayFloat[source]#
colour.difference.delta_E_CMC(Lab_1: Domain100, Lab_2: Domain100, l: float = 2, c: float = 1, *, additional_data: Literal[True]) DeltaE_Specification_CMC

Compute the colour difference \(\Delta E_{CMC}\) between two specified CIE L*a*b* colourspace arrays using the Colour Measurement Committee recommendation.

The quasimetric has two parameters: lightness (l) and chroma (c), allowing 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 (Domain100) – CIE L*a*b* colourspace array 1.

  • Lab_2 (Domain100) – CIE L*a*b* colourspace array 2.

  • l (float) – Lightness weighting factor.

  • c (float) – Chroma weighting factor.

  • additional_data (bool) – Whether to output additional data.

Returns:

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

Return type:

numpy.ndarray or DeltaE_Specification_CMC

Notes

Domain

Scale - Reference

Scale - 1

Lab_1

100

1

Lab_2

100

1

References

[Lin09b]

Examples

>>> Lab_1 = np.array([48.99183622, -0.10561667, 400.65619925])
>>> Lab_2 = np.array([50.65907324, -0.11671910, 402.82235718])
>>> delta_E_CMC(Lab_1, Lab_2)
np.float64(0.8996999...)
>>> delta_E_CMC(
...     Lab_1,
...     Lab_2,
...     additional_data=True,
... )
DeltaE_Specification_CMC(dE=np.float64(0.8996999...), dL=np.float64(-0.7743459...), dC=np.float64(-0.4580766...), dH=np.float64(0.0037676...))