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
Colors got rounded wrong in a special usecase where there are too many color transformations and for
'ts/color/css/hexrgba' to work I need to enable format hex bcs that's the only output that gives usable css
'ts/color/modifiers': {
format: 'hex',
},
I need this modifier to actually not get something unusable like: -color-overlay-tooltip-default: rgba(hsl(240 11.1% 9%) , 0.8);
But this transformation it seems is doing Math.ciel() instead of Math.round()
And breaking my values.
Reproduction
No response
Expected output
No response
Version
latest
The text was updated successfully, but these errors were encountered:
Can you add a reproduction and the expected output vs actual output so it's a bit easier for me to verify that there is a color transformation rounding error?
When we transform colors in this library we use ColorJS.io which does allow you to pick the colorSpace to do the transformation in, so doing the color modifier transformation in SRGB space vs HSL space may give you different results, but this is customizable by changing the space value in the modifier:
If the color space is not the problem and it's literally just an issue of ColorJS.io doing a Math.ceil vs Math.round, we may need to raise an issue in their repo since it might be a bug there rather than in SD-transforms, but in order for me to know where the problem is I'll need a bit more info
What happened?
Colors got rounded wrong in a special usecase where there are too many color transformations and for
'ts/color/css/hexrgba' to work I need to enable format hex bcs that's the only output that gives usable css
I need this modifier to actually not get something unusable like:
-color-overlay-tooltip-default: rgba(hsl(240 11.1% 9%) , 0.8);
But this transformation it seems is doing Math.ciel() instead of Math.round()
And breaking my values.
Reproduction
No response
Expected output
No response
Version
latest
The text was updated successfully, but these errors were encountered: