Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check CMC (l:c) formula for correctness #66

Closed
danburzo opened this issue Oct 18, 2018 · 2 comments
Closed

Check CMC (l:c) formula for correctness #66

danburzo opened this issue Oct 18, 2018 · 2 comments
Labels
Bug Something isn't working Help Welcome Extra attention is needed

Comments

@danburzo
Copy link
Collaborator

The CMC color difference function performs the worst in this comparison:
https://beta.observablehq.com/@danburzo/nearest-css-named-colors

screen shot 2018-10-18 at 17 11 25

This makes me suspicious there's an error somewhere in the implementation.

@danburzo danburzo added Bug Something isn't working Help Welcome Extra attention is needed labels Oct 18, 2018
@danburzo
Copy link
Collaborator Author

danburzo commented Oct 18, 2018

Also, HSL Euclidean distance is similarly suspect here

https://beta.observablehq.com/@danburzo/nearest-color

screen shot 2018-10-18 at 17 56 47

@danburzo
Copy link
Collaborator Author

danburzo commented Oct 18, 2018

For HSL — and, for that matter, all spaces that contain a hue element — the Hue will have an inordinate impact, since it's in the range [0, 360), while the other components are in the range [0,1]. We also need a way to perform hueDistance (shortest path) rather than normal distance between them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Help Welcome Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant