I am converting some of my color values from scss rgba variables to css custom properties using the hsla color model.
For example,
$color-navy: rgba(57, 80, 112, 1);
becomes
:root {
--color-navy: hsla(214, 33%, 33%, 1);
}
My problem is I use the scss rgba()
function to add varying degress of opacity to my colors:
color: rgba($color-black, 0.87);
Is there an hsla equivalent of this where I can pass in my custom property and apply an alpha?
Example of what I want to achieve:
hsla(var(--color-black), 0.5)