I'm trying to change the opacity of a color that is stored within a variable.
:root {
--main-theme-color: rgb(123, 40, 231);
}
.box{
background-color: rgba(var(--message-box-transparency),0.5);
}
I tried making it rgba to change the opacity of the color in the variable but it isn't working, is there another way to change the opacity of a color within the variable.