I code that has many :root CSS color variables, as so:
--gray: rgb(142,142,147);
--gray-2: rgb(174,174,178);
--gray-3: rgb(199,199,204);
--gray-4: rgb(209,209,214);
--gray-5: rgb(229,229,234);
--gray-6: rgb(242,242,247);
--gray-c: rgb(142,142,147);
--gray-c2: rgb(99,99,102);
--gray-c3: rgb(72,72,74);
--gray-c4: rgb(58,58,60);
--gray-c5: rgb(44,44,46);
--gray-c6: rgb(28,28,30);
I've now come to need to change the opacity of these colors. I wasn't thinking at the time about changing the opacity or manipulating these colors. The project uses SCSS, so I thought the possibility to do something like background: rgba(var(--gray-5), 0.5)
would be possible, but alas it is not. What's the best way of approching this?