color2k
color2k copied to clipboard
Support space separated rgb values
Example:
color2k.parseToRgba('rgb(255 235 235 / .18)') // (index):139 Uncaught Error: Failed to parse color
This should work with the new CSS Color Module Level 4
Do you know what the browser support is for that syntax? I'm not familiar with this notation but if browsers support this, this lib should probably too.
It's pretty well supported. I haven't seen it much, but had another library that was outputting colors in that format and needed to convert them to rgba
I ran over a similar problem but with hsl
when looking into MDN the comma-separated notation is considered to be legacy MDN- HSL