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
Designer asked to make rgba(primaryColor, 0.1) but I have to set it as background color and it cannot have opacity because there is another element behind it.
So I need to make non transparent color.
I cannot use lighten or setLightness because I don't know required lightness. I know only opacity.
should probably include a Math.round to wrap the math, otherwise you can end up with wonky hex values as it tries to deal with floating point values in the RGB channels. i.e.:
Summary
Add function to convert Rgba to Rgb
Basic Example
Or maybe it should be
lightenToOpacity
?Reasoning
Designer asked to make
rgba(primaryColor, 0.1)
but I have to set it as background color and it cannot have opacity because there is another element behind it.So I need to make non transparent color.
I cannot use
lighten
orsetLightness
because I don't know required lightness. I know only opacity.This link was useful for me https://filosophy.org/code/online-tool-to-lighten-color-without-alpha-channel/
The text was updated successfully, but these errors were encountered: