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.

Example

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

colormath.color_diff.delta_e_cie1976(color1, color2)[source]

Calculates the Delta E (CIE1976) of two colors.

Delta E CIE 1994

colormath.color_diff.delta_e_cie1994(color1, color2, K_L=1, K_C=1, K_H=1, K_1=0.045, K_2=0.015)[source]

Calculates the Delta E (CIE1994) of two colors.

K_l:
0.045 graphic arts 0.048 textiles
K_2:
0.015 graphic arts 0.014 textiles
K_L:
1 default 2 textiles

Delta E CIE 2000

colormath.color_diff.delta_e_cie2000(color1, color2, Kl=1, Kc=1, Kh=1)[source]

Calculates the Delta E (CIE2000) of two colors.

Delta E CMC

colormath.color_diff.delta_e_cmc(color1, color2, pl=2, pc=1)[source]

Calculates the Delta E (CMC) of two colors.

CMC values
Acceptability: pl=2, pc=1 Perceptability: pl=1, pc=1