lucasb-eyer / go-colorful

A library for playing with colors in go (golang).
MIT License
1.14k stars 57 forks source link

Added a CIE94 distance formula. #7

Closed pkulak closed 9 years ago

lucasb-eyer commented 9 years ago

perfect, thanks!

lucasb-eyer commented 9 years ago

I merged it by hand and must've done something github doesn't like, but your authorship has been preserved: a697a2ba47879362f3fe70af7a632e4c8336ff82. Anyways, thanks for this contribution!

lucasb-eyer commented 7 years ago

FYI, there was a subtle bug in there that made the computations wrong. I've noticed it while adding tests to increase coverage.

The problem was that the L,a,b values of go-colorful are around [0,1] while the formulas you used (and are commonly found online) work with values around [0,100] and thus the constats are in the wrong range.

pkulak commented 7 years ago

Oh wow! Good catch. Sorry about that!

lucasb-eyer commented 7 years ago

No worries, thank you for the implementation! Just thought I'd let you know here in case you were still using this somewhere!