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

Got hue value NaN from chroma('#000000').oklch() #322

Open
leadream opened this issue Jan 22, 2024 · 1 comment
Open

Got hue value NaN from chroma('#000000').oklch() #322

leadream opened this issue Jan 22, 2024 · 1 comment

Comments

@leadream
Copy link

image

regorxxx added a commit to regorxxx/chroma.js that referenced this issue Feb 4, 2024
… with no hue (like black, white or grays) in color spaces which work internally with hue values (like LCH, HSL, ...). By default these colors returned a NaN hue value, but this behavior can now be changed to output always zero by using "chroma.noHueAsZero(true)" first at any time. See [Issue 322](gka#322)

* minor improvements to documentation

Signed-off-by: regorxxx <regorxxx@protonmail.com>
@regorxxx
Copy link

regorxxx commented Feb 4, 2024

See this #321
Read the docs, it's intended that colors with no hue should return NaN.

On the updated repo there is a way to change this behavior.

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