Closed nonmetalhail closed 4 years ago
Seems like whenever I have a color where the saturation is 0% or the lightness is 0% or 100%, I get NaN values in the returned color object.
NaN
Easiest to see the various examples here: https://observablehq.com/d/f7636f7695376a03
But, for example: d3.hsl('#ffffff') returns {h: NaN, s: NaN, l: 1, opacity: 1}
d3.hsl('#ffffff')
{h: NaN, s: NaN, l: 1, opacity: 1}
This is intended. See:
https://observablehq.com/@d3/achromatic-interpolation
Might be a good idea to add a note to the readme (unless it's already there and I missed it)?
Seems like whenever I have a color where the saturation is 0% or the lightness is 0% or 100%, I get
NaN
values in the returned color object.Easiest to see the various examples here: https://observablehq.com/d/f7636f7695376a03
But, for example:
d3.hsl('#ffffff')
returns{h: NaN, s: NaN, l: 1, opacity: 1}