Re: [csswg-drafts] propose a `hexa()` function that mirrors `rgba()` functionality for hex color codes (#7327)

> E.g. the semi-transparent red from your example can be expressed via `#ff000064`. The good news is that you can already use this syntax today, as it is already available in all browsers for some time. 

Not useful beyond design time to specify static colors. To create 10%, 20%, 30%, 40%..90% alpha versions of all the colors in a theme, just so they available for a button or some effect that requires it, is extremely clunky.

> ```css
> --my-color-red: #ff0000;
> background: rgb(from var(--my-color-red) r g b / 0.5);
> ```

I guess this will be the most sematic way to alter the alpha of a hex color, looking forward to it!!




-- 
GitHub Notification of comment by mangelozzi
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7327#issuecomment-1140429785 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 29 May 2022 11:34:39 UTC