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.
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.
colormath.color_diff.
delta_e_cie2000
(color1, color2, Kl=1, Kc=1, Kh=1)[source]¶
Calculates the Delta E (CIE2000) of two colors.
colormath.color_diff.
delta_e_cmc
(color1, color2, pl=2, pc=1)[source]¶
Calculates the Delta E (CMC) of two colors.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4