Open LeaVerou opened 2 years ago
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.
Why prefix them all with dE
? That's a bit clunky: color.deltaE(color2, "dE76")
Sure, if the method name already gives context it can be omitted
OK so the two standard values would be "76" and "2000".
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"
?
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.