Re: [csswg-drafts] [css-color-6] Does color-layers() need a color interpolation method (or similar)? (#13254)

> The original idea behind color-layers() was to replace/simplify this kind of hack:
> 
> ```
> background-color: var(--color-0);
> background-image: linear-gradient(var(--color-1)), linear-gradient(var(--color-2))
> ```
> 
> into
> 
> ```
> background-color: color-layers(var(--color-0), var(--color-1), var(--color-2))
> ```
> 
> so it's been assuming how compositing works which I think uses srgb.

Ah, but the point I was making above is that it won't necessarily be sRGB. Is not well defined, and in most engines, it happens in whatever color space the backing store happens to be in, which often is not sRGB.

If the goal is to replace that particular idiom, and we wanted to match it identically, we don't have a great solution.

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


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

Received on Tuesday, 30 December 2025 01:44:03 UTC