CSS alpha()

The alpha() function accepts any color, including CSS variables, and sets its opacity. You don't need another variable or color-mix().