Delta E Equations¶
Delta E equations are used to put a number on the visual difference between two
LabColor instances. While
different lighting conditions, substrates, and physical condition can all
introduce unexpected variables, these equations are a good rough starting point
for comparing colors.
Each of the following Delta E functions has different characteristics. Some may be more suitable for certain applications than others. While it’s outside the scope of this module’s documentation to go into much detail, we link to relevant material when possible.
from colormath.color_objects import LabColor from colormath.color_diff import delta_e_cie1976 # Reference color. color1 = LabColor(lab_l=0.9, lab_a=16.3, lab_b=-2.22) # Color to be compared to the reference. color2 = LabColor(lab_l=0.7, lab_a=14.2, lab_b=-1.80) # This is your delta E value as a float. delta_e = delta_e_cie1976(color1, color2)
Delta E CIE 1976¶
Calculates the Delta E (CIE1976) of two colors.
Delta E CIE 1994¶
delta_e_cie1994(color1, color2, K_L=1, K_C=1, K_H=1, K_1=0.045, K_2=0.015)¶
Calculates the Delta E (CIE1994) of two colors.
- 0.045 graphic arts 0.048 textiles
- 0.015 graphic arts 0.014 textiles
- 1 default 2 textiles
Delta E CIE 2000¶
delta_e_cie2000(color1, color2, Kl=1, Kc=1, Kh=1)¶
Calculates the Delta E (CIE2000) of two colors.