You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const c = new Color("hsl(0, 0%, 0%)").alpha(1.0e-7);
const c2 = new Color(c.string());
> Uncaught Error: Unable to parse color from string: hsla(0, 0%, 0%, 1e-7)
Since the value entered in alpha in my application is computed, it is sometimes passed a number that is tiny. new Color is happy to accept it, and happy to turn it into a string, but cannot parse that string.
This can be solved on my end by using toFixed on the value before passed into alpha(), but it seems like this should be done on Color's side. I think there should be an expectation that any string Color produces should also be parsable.