Hey! With chroma.js 3.0.0, the css method seems to produce invalid values for certain colors:
chroma('white').lch(); // [100,0,NaN]
chroma('white').css("lch"); // "lch(100% 0 NaNdeg)"
Tested in a browser, lch(100% 0 NaNdeg) is an invalid color value. I would expect the css method to always provide a valid color value, even if the color doesn't necessarily make sense in the given color space.
I believe this issue is not a duplicate of #322, as the css method previously took care when handling NaN, regardless of whether hsl included NaN in its output:
chroma('white').hsl(); // [NaN,0,1,1]
chroma('white').css("hsl"); // "hsl(0deg 0% 100%)"
Hey! With chroma.js 3.0.0, the
cssmethod seems to produce invalid values for certain colors:Tested in a browser,
lch(100% 0 NaNdeg)is an invalid color value. I would expect thecssmethod to always provide a valid color value, even if the color doesn't necessarily make sense in the given color space.I believe this issue is not a duplicate of #322, as the
cssmethod previously took care when handlingNaN, regardless of whetherhslincludedNaNin its output: