colorjs / color-rgba

Get rgba array from color string

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trouble parsing hsl with turn

tschaub opened this issue · comments

I see that rgba('hsl(0.3turn 60% 45% / .7)') returns [183.60000000000002, 46.58849999999999, 45.899999999999984, 0.7].

It looks like this resolves to [73, 184, 46, 0.7] in a browser.

Is parsing hsl strings with turn supposed to be supported?

Oh, turn units are not supported yet by color-parse, need to be added there.

Ok, fixed in color-rgba@3.0.0.
It may not support any-to-any color conversions for now, but the core works well.

Thanks for the quick fix, @dy