Re: [fxtf-drafts] [compositing-2] 'lighter' vs 'plus-lighter' (#446)

It still isn't clear to me when the colours would be clamped to the gamut.

@ccameron-chromium

> The compositor will, at the end, clamp the colors to the gamut of the display

When is "the end"? For example:

```js
const ctx = canvas.getContext('2d');
ctx.fillStyle = 'rgb(100%, 0%, 0%)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = 'rgb(100%, 100%, 0%)';
ctx.globalCompositeOperation = 'lighter';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = 'rgb(50%, 50%, 0%)';
ctx.globalCompositeOperation = 'multiply';
ctx.fillRect(0, 0, canvas.width, canvas.height);
```

Is the multiply operation working on `rgb(200%, 100%, 0%)` (unclamped after 'lighter') or `rgb(100%, 100%, 0%)` (clamped after 'lighter')?

Would the result be different if the compositing was done with `mix-blend-mode` or `background-blend-mode`?

-- 
GitHub Notification of comment by jakearchibald
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/446#issuecomment-985370612 using your GitHub account


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

Received on Friday, 3 December 2021 09:41:08 UTC