-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Bug in deltaEJz? yellows and blues strangly close together #89
Comments
I recently implemented Jzazbz in my own project and personally skipped implementing I see nothing wrong with color.js's implementation of Personally, I think this is just the way the |
Thanks for the report, which is here as a notebook. Firstly, deltaEJz values are incredibly small (so are deltaEITP, but our implementation adds the recommended 720x scaling; and so are deltaEOK). I suggested here that a scaling of 400 would be appropriate for deltaEJz when comparing to other metrics, but that was not an in-depth examination. But that doesn't explain the strange and apparently non-perceptual differences that you are seeing. Unfortunately deltaEJz is relatively little tested in the literature. |
There might be a small error in dH, shouldn't that be |
Oh, wow...I must have made a very similar mistake. I like to implement directly from the spec and then compare against other implementations. I went over the spec multiple times and not only made the same mistake but couldn't see it after comparing and re-comparing the math 🤦🏻. So I adjusted color.js to use > goldenrod.deltaEJz(peru)
0.037482866533877626
> goldenrod.deltaEJz(cornflowerblue)
0.20345942022978947 |
Nope, I didn't make the same mistake: facelessuser/coloraide@d901c52#diff-8b70d5b88994afe5d248c27f39727317986e8e92c6472a3a7f62ffc32b621c65R305. Maybe, my eyes just got confused with decimal points and thought the values were off. I guess I'll have to go back and test my old implementation again. Regardless, it looks like fixing the things in color.js gives more sane results. |
I noticed that for the
deltaEJz
algorithm, the yellows and blues are strangely close together. E.g.,goldenrod
is apparently closer to blues likecornflowerblue
orroyalblue
than toperu
orkhaki
? That seems ... unintuitive.The other color functions seem to agree that the yellows should be much closer to each other than to the blues.
For your convenience, I have created this comparison of color distances between yellows and blues and different distance functions. It works really nicely when copied into one of your incredibly useful notebooks:
However, I really don't have a clue about colors at all, let alone color space and not to mention distance functions in those spaces. So it might very well be that this is the way it is supposed to be for that
deltaEJz
distance function, in which case I'm very sorry for the noise 😔.The text was updated successfully, but these errors were encountered: