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

Bug in compare_colour() with from_space="hcl" #44

Closed
jmw86069 opened this issue Apr 24, 2024 · 0 comments
Closed

Bug in compare_colour() with from_space="hcl" #44

jmw86069 opened this issue Apr 24, 2024 · 0 comments

Comments

@jmw86069
Copy link

First, I love your R work, your generative artwork, overall it is quite inspiring. Much respect.

I have found a bug. It's simple but important.

In farver.cpp the function compare_dispatch_from() does not include an entry for Hcl. It should be the 13th entry, as with compare_dispatch_to().
As a result, the following example returns the first HCL color, which "should never happen" but unfortunately does:

farver::compare_colour(farver::decode_colour("#BB1133", to="hcl"),
   farver::decode_colour("#AA0011", to="hcl"),
   to_space="hcl",
   from_space="hcl")

Output:

        h   c    l
[1,] 7.93 117 39.9

(Expected output is a numeric distance.)

I have another issue - I will report separately. Thank you!

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

1 participant