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

Make DeltaEMethod a string #16

Open
LeaVerou opened this issue Jul 21, 2021 · 5 comments
Open

Make DeltaEMethod a string #16

LeaVerou opened this issue Jul 21, 2021 · 5 comments

Comments

@LeaVerou
Copy link
Collaborator

As discussed with @tabatkins, to allow DeltaEMethod to be extensible, it should be a string instead of an enum, and the values can be checked via the implementation.

@svgeesus
Copy link
Collaborator

The two standard values should be "dE76" and "dE2000"; the first because it is fast, and may be good enough in some cases; and the latter because it is the most accurate method when that matters.

@LeaVerou
Copy link
Collaborator Author

Why prefix them all with dE? That's a bit clunky: color.deltaE(color2, "dE76")

@svgeesus
Copy link
Collaborator

Sure, if the method name already gives context it can be omitted

@svgeesus
Copy link
Collaborator

svgeesus commented Aug 4, 2021

OK so the two standard values would be "76" and "2000".

@LeaVerou
Copy link
Collaborator Author

After talking with @tabatkins again, we only need to make it a string if we want it to be user extensible.
I propose that, in the interest of keeping API surface small, we ship with an enum now, and we can always relax it later, when we add a way for authors to add deltaE methods.

That said, are we still good with only "76" and "2000"? Do we also need to add "OK"?

@LeaVerou LeaVerou added this to the Level 2+ milestone Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants