- From: Nevdev via GitHub <noreply@w3.org>
- Date: Fri, 27 Jun 2025 15:50:53 +0000
- To: public-fxtf-archive@w3.org
> > I think the formula should be this: > > co = max(0, Cb - (1 - Cs) * αs) = max(0, Cb + Cs * αs - αs); αo = min(1, αs + αb); > > This fits perfectly with what I see in Figma. > > Based on testing Safari with editing the above into https://wpt.live/css/compositing/canvas-composite-modes.html that doesn't appear to work, at the very least because it doesn't produce proper premultiplied results. The first error is: > > > assert_equals: premultiplication zero check: g=0 a=0 plus-darker g=47 a=0 expected 0 but got 0.1843137254901961 > > which indicates that it's producing a color output larger than the alpha output, which is not valid for something that is expected to produce premultiplied outputs. > > It also seems wrong because it doesn't treat source and destination the same, whereas the other formulas for `plus-lighter` and `plus-darker` do not change if you swap source and destination. I thought that could work. I tried calculate the RGB values myself, and the results were fitting well with Figma. Don't know how that weird number `0.1843137254901961` appears. -- GitHub Notification of comment by Nevodev Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/447#issuecomment-3013519538 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 27 June 2025 15:50:54 UTC