We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The code in hsl2rgb.js is forcing the RGB components to be rounded to the nearest integer:
hsl2rgb.js
chroma.js/src/io/hsl/hsl2rgb.js
Line 31 in cd1b3c0
This means that even if you pass false to rgb(), the resulting color gets rounded. The issue does not occur with HSV.
false
rgb()
Minimal reproduction:
import chroma from "chroma-js"; let color = chroma.hsv(260, 0.5, 0.5); let colorRgb = color.rgb(false); // [ 84.99999999999999, 63.75, 127.5 ] color = chroma.hsl(260, 0.3333333333333333, 0.375); colorRgb = color.rgb(false); // [ 85, 64, 128 ]
The text was updated successfully, but these errors were encountered:
Interesting, thanks for the bug report. I'll marked this as bug to remind myself to fix it soon.
Sorry, something went wrong.
round
hsl2rgb
Successfully merging a pull request may close this issue.
The code in
hsl2rgb.js
is forcing the RGB components to be rounded to the nearest integer:chroma.js/src/io/hsl/hsl2rgb.js
Line 31 in cd1b3c0
This means that even if you pass
false
torgb()
, the resulting color gets rounded. The issue does not occur with HSV.Minimal reproduction:
The text was updated successfully, but these errors were encountered: