Re: [csswg-drafts] [css-color-5] Make channel values in relative color syntax optional (#10689)

[poll concluded](https://mastodon.scot/@svgeesus/114574983650035139) with 152 responses. 

- **55%** preferred `alpha(var(--mycolor) 0.6)`
- **42%** preferred `opacity(var(--mycolor) 0.6)`
- **3%** preferred some other option.

![screenshot of the poll results, on Mastodon](https://github.com/user-attachments/assets/dfd9e3d9-2d20-4707-8dd0-1414f4ddb55e)

Several people commented that they would expect `opacity()` to affect images and child elements, in other words like the `opacity` property.

The polled syntax set the alpha to a fixed value. Relative values would also be possible, with an `alpha` keyword, and calc:

`alpha(var(--mycolor) calc(alpha * 0.8))`

In general, having a dedicated function to adjust alpha values of colors seemed to be liked compared to the convoluted paths that people use now (including having to set the colorspace, which makes no difference to alpha).

So - while the question of making channel values optional is still open, the majority use case seems to be addressed by a new, dedicated "alpha RCS" 

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


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

Received on Monday, 2 June 2025 15:16:36 UTC