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
When using an alpha value with d3.rgb, via rgba or hsla colors strings, the color values return NaN.
d3.rgb
rgba
hsla
NaN
Is this expected behavior?
tested on d3-color@1.4.0
d3-color@1.4.0
d3.rgb('hsla(240,100%,25%,0)'); // returns { r: NaN, b: NaN, g: NaN, opacity: 0, }
d3.rgb('rgba(0,0,0,0)'); // returns { r: NaN, b: NaN, g: NaN, opacity: 0, }
Also interesting to note that the behavior of non-zero, but close to zero, alpha values return the expected color.
d3.rgb('rgba(0,0,0,0.001)'); // returns { r: 0, b: 0, g: 0, opacity: 0.001, }
The text was updated successfully, but these errors were encountered:
duplicate of #52
Sorry, something went wrong.
No branches or pull requests
When using an alpha value with
d3.rgb
, viargba
orhsla
colors strings, the color values returnNaN
.Is this expected behavior?
Also interesting to note that the behavior of non-zero, but close to zero, alpha values return the expected color.
The text was updated successfully, but these errors were encountered: