gka / chroma.js

JavaScript library for all kinds of color manipulations
https://vis4.net/chromajs/
Other
9.94k stars 543 forks source link

Bug report: New CSS color formats/syntax unknown #297

Open brandonmcconnell opened 2 years ago

brandonmcconnell commented 2 years ago

I am getting this error when using a very common (newer) CSS color syntax.

The errors

These would be their older equivalents

This new syntax and its different nuances should be supported. In many browsers, this new color syntax is already the default.

Gotchas

wawyed commented 1 year ago

Is this something that could be looked at? @gka

Ambient-Impact commented 1 year ago

I'd open a pull request if I had more experience with this package and colours in general. This really tripped me up when trying to debug why https://github.com/larsenwork/postcss-easing-gradients was failing on certain colour values, and specifically hsl()/hsla() that had the deg unit. Maybe I'll come back to this on another day and give it a shot.

akicho8 commented 1 year ago

I'm struggling with the same issue. I've been using chroma.js in many places as it's very convenient. However, it's difficult to migrate to a new format because chroma.js doesn't support it yet.