d3 / d3-color

Color spaces! RGB, HSL, Cubehelix, CIELAB, and more.
https://d3js.org/d3-color
ISC License
398 stars 91 forks source link

CIEDE2000 color difference #48

Closed danburzo closed 3 years ago

danburzo commented 6 years ago

In the spirit of I couldn't help it I've ported all the color difference metrics to work with d3-color here 👉 https://github.com/danburzo/d3-color-difference

Out of them the euclidean distances are trivial to compute by end-users, and from the rest CIEDE2000 is supposedly the most accurate, and a hassle to implement. May be a good addition to d3-color itself, or is it preferable as a separate package?

(Oooh, I missed this notebook!)

Fil commented 4 years ago

Here's Mike's notebook refactored as a function: https://observablehq.com/d/32f6092ebe8847bf

(And………… I had missed this issue :^) I've now unpublished my notebook and link to this repo instead)

And this test notebook: https://observablehq.com/@fil/perceptually-uniform

Fil commented 4 years ago

It's an interesting function but I don't mind having it in a separate module. Maybe it could be easier to discover with a link in this module’s README, and a more demo notebooks? There are already quite a few links in the "For additional color spaces, see:" paragraph, which could have a title ("Extensions") and add this module?

danburzo commented 4 years ago

It's an interesting function but I don't mind having it in a separate module.

Yep, a separate module works for me.

danburzo commented 3 years ago

I think this issue can be closed now that d3-color-difference is mentioned in the README.