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

I recently looked at the Porter-Duff operators in Compositing Level 2; `plus-ligher` and `plus-darker` would also not work in non-RGB spaces. This is because those two, unlike the others, introduce assumptions about the color component channels, just like blend modes do. The original Porter-Duff operators don't.

I know the current equations for `plus-darker` in the spec are currently not right, but I've seen a working [proposal](https://github.com/w3c/fxtf-drafts/issues/447#issuecomment-1699293766) in one of the issue threads, and it also would require RGB.

So, the original Porter Duff equations were likely compatible enough with non-RGB spaces, but the newer ones (which only Apple has implemented) would require RGB spaces to operate in.

This is demonstrated below. I implemented `plus-lighter` and `plus-darker` locally, relaxed the RGB requirement, and then overlaid three circle images using the aforementioned operators in sRGB, Oklab, and Lab. Results are clipped to sRGB on output. Oklab looked "better" than Lab as it is scaled closer to 0 - 1, but it is definitely not practical to use, as there are other cases in which it would perform even worse.

<img width="669" height="264" alt="Image" src="https://github.com/user-attachments/assets/98e8d44a-b992-4ae4-9f10-8ae1f82a2c74" />





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


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

Received on Saturday, 10 January 2026 15:51:54 UTC