- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Sat, 28 May 2022 17:58:53 +0000
- To: public-css-archive@w3.org
Your usecase seems covered by https://drafts.csswg.org/css-color-5/#relative-colors
> For example, if a theme color is specified as opaque, but in a particular instance you need it to be partially transparent:
> ```css
> html { --bg-color: blue; }
> .overlay {
> background: rgb(from var(--bg-color) r g b / 80%);
> }
> ```
> In this example, the r, g, and b channels of the [origin color](https://drafts.csswg.org/css-color-5/#origin-color) are unchanged, indicated by specifying them with the keywords drawing their values from the origin color, but the opacity is set to 80% to make it slightly transparent, regardless of what the origin color’s opacity was.
--
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7327#issuecomment-1140305833 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 28 May 2022 17:58:54 UTC