colour.delta_E#
- colour.delta_E(a: ArrayLike, b: ArrayLike, method: Literal['CIE 1976', 'CIE 1994', 'CIE 2000', 'CMC', 'ITP', 'CAM02-LCD', 'CAM02-SCD', 'CAM02-UCS', 'CAM16-LCD', 'CAM16-SCD', 'CAM16-UCS', 'DIN99'] | str = 'CIE 2000', **kwargs: Any) NDArrayFloat [source]#
Return the difference \(\Delta E_{ab}\) between two given CIE L*a*b*, \(IC_TC_P\), or \(J'a'b'\) colourspace arrays using given method.
- Parameters:
a (ArrayLike) – CIE L*a*b*, \(IC_TC_P\), or \(J'a'b'\) colourspace array \(a\).
b (ArrayLike) – CIE L*a*b*, \(IC_TC_P\), or \(J'a'b'\) colourspace array \(b\).
method (Literal['CIE 1976', 'CIE 1994', 'CIE 2000', 'CMC', 'ITP', 'CAM02-LCD', 'CAM02-SCD', 'CAM02-UCS', 'CAM16-LCD', 'CAM16-SCD', 'CAM16-UCS', 'DIN99'] | str) – Computation method.
c – {
colour.difference.delta_E_CIE2000()
}, Chroma weighting factor.l – {
colour.difference.delta_E_CIE2000()
}, Lightness weighting factor.textiles – {
colour.difference.delta_E_CIE1994()
,colour.difference.delta_E_CIE2000()
,colour.difference.delta_E_DIN99()
}, Textiles application specific parametric factors \(k_L=2,\ k_C=k_H=1,\ k_1=0.048,\ k_2=0.014,\ k_E=2,\ k_CH=0.5\) weights are used instead of \(k_L=k_C=k_H=1,\ k_1=0.045,\ k_2=0.015,\ k_E=k_CH=1.0\).kwargs (Any) –
- Returns:
Colour difference \(\Delta E_{ab}\).
- Return type:
References
[ASTMInternational07], [InternationalTUnion19], [LLW+17], [Lin03a], [Lin11], [], [Lin09b], [LCL06], [Mel13], [Wikipedia08a]
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) 94.0356490... >>> delta_E(a, b, method="CIE 2000") 94.0356490... >>> delta_E(a, b, method="CIE 1976") 451.7133019... >>> delta_E(a, b, method="CIE 1994") 83.7792255... >>> delta_E(a, b, method="CIE 1994", textiles=False) ... 83.7792255... >>> delta_E(a, b, method="DIN99") 66.1119282... >>> a = np.array([0.4885468072, -0.04739350675, 0.07475401302]) >>> b = np.array([0.4899203231, -0.04567508203, 0.07361341775]) >>> delta_E(a, b, method="ITP") 1.42657228... >>> 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") 0.0001034... >>> delta_E(a, b, method="CAM16-LCD") 0.0001034...