Hi :) I do not think you could change alpha for once defined color. You can manipulate with custom values of opacity, but you need to define your variables as values passed to hsl() function. See example below.
:root {
--bg-color: 0, 0%, 0%;
--opacity: 50%;
}
div {
background-color: hsla(var(--bg-color), var(--opacity));
}
Hope it helps... a bit at least ;)
Marked as helpful
0