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

> be possible using relative colors. Applying that syntax to your example, this looks like
> 
> ```css
> --my-color-red: #ff0000;
> background: rgb(from var(--my-color-red) r g b / 0.5);
> ```

I thought about `color-mix(var(--your-color) 80%, #00000080)` which would darken and add transparency, I was not aware that `color-mix` is specified to work with `transparent` in this way. It is a bit of an obscure way to alter the aplha, but that will be great (for those who can figure it out). I have a python background, where part of the zen of python is "explicit is better than implicit". Anyways just glad there will be a way to do it one day! Thanks!

-- 
GitHub Notification of comment by mangelozzi
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7327#issuecomment-1140428587 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:26:56 UTC