-
Notifications
You must be signed in to change notification settings - Fork 37
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
Conversion of HSV fails when V = 0 #35
Comments
Only seems to impact the HSV case. HSL conversion:
HSV conversion:
|
Good catch! |
Fix published upstream in [email protected]. Can be cherry-picked/merged from TehShrike@436d8b0 |
Thanks for the quick fix! |
Awesome! Thanks for the patch @TehShrike, and sorry for the radio silence on my end, this will be in a patch release as soon as I can get to my laptop today. |
Oh wait, @TehShrike, when you’re able to, would you be able to make a pull request? Thanks! |
This appears to be caused by division by zero, resulting in the saturation component evaluating to NaN.
Line 12 seems to be where the division by zero occurs:
https://github.com/toish/chromatism/blob/488020a1553d5aa0a0ffb1fbd98fc19a6be6503d/src/conversions/hsv.js#L9-L17
The text was updated successfully, but these errors were encountered: