chroma.js
chroma.js copied to clipboard
`transparent` keyword missing
Hi, it seems that the transparent
keyword is not a valid chroma value, is not present on the X11 color list but it is a valid keyword in CSS at least https://www.w3.org/TR/css-color-3/#transparent
What is the reason behind that missing keyword?
as you said transparent
is a keyword not a color-name. The doc sais "it will recognize any named color from the W3CX11 specification".
as you said transparent is a keyword not a color-name
You are right, I was probably confused by the fact that W3C calls them keywords and not color names: Basic color keywords
, Extended color keywords
, A <color> is either a keyword (see Recognized color keyword names) or a numerical RGB specification.
I took a look at the X11 color list but seems that the chroma.js use the SVG color list instead, that is derived from that X11 color list but doesn't follow it completely: https://www.w3.org/TR/SVG11/types.html#ColorKeywords (the grey value is an example)
Anyway, what do you think about adding the transparent
CSS color keyword into the list of the accepted color names?
Do you think is reasonable, for a javascript color library, handling such exception?
Same issue for unset and any keyword... It's quite restrictive to not have those (I'm coming here from another addon that uses chroma as util).