Skip to content

nripankadas07/colourdist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

colourdist

Colour-difference metrics — CIE76, CIE94, CIEDE2000 — plus the sRGB ↔ XYZ ↔ Lab conversions you need to feed them. Pure Python, zero deps.

from colourdist import hex_to_lab, delta_e_2000

red    = hex_to_lab("#e8443c")
salmon = hex_to_lab("#fa8072")
delta_e_2000(red, salmon)   # ≈ 17.4 — clearly distinguishable
Metric Use when
delta_e_76 You want fast and don't care about perceptual accuracy.
delta_e_94 Reasonable middle ground; widely cited.
delta_e_2000 Modern standard. Use this unless you have a reason not to.

D65 reference white throughout. CIEDE2000 implementation matches the Sharma/Wu/Dalal 2005 reference values to within 1e-3.

MIT.

About

CIE colour-difference metrics (CIE76, CIE94, CIEDE2000) plus sRGB ↔ XYZ ↔ Lab conversions. Pure Python.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages