CSS alpha()
The alpha() function accepts any color, including CSS variables, and sets its opacity. You don't need
another variable or color-mix().
background: alpha(from #ffcc00 / 40%);
Literal color
background: alpha(from var(--brand) / 40%);
Custom property