Re: [fxtf-drafts] [compositing] Question: in what color space will blending occur? (#427)

> However, if it can be shown that RGB components outside the range [0..1] are correctly handled by the blending operations, then converting colors into an extended-range sRGB space for blending would not force colors into the sRGB gamut. It would also make the spec testable.

Unfortunately, due to tone reproduction curves (gamma), the math on this doesn't work out.

For example, both Display P3 and sRGB use the same tone reproduction curve. But a color in one of the spaces will, when converted to the other, end up being at a different point along the tone reproduction curve. If you convert, blend, then convert back, the result will be different from if the blending had been performed in the original color space.

Note that this is only a problem for blending which occurs in a non-linear colorspace (i.e. one with a non-linear tone reproduction curve, or which otherwise is defined in a non-linear way in order to make colors seem more perceptually linear).

Blending performed in a linear colorspace will always give equivalent results regardless of which colorspace the blend is done in, assuming values have sufficient precision.

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


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

Received on Friday, 24 January 2025 17:26:38 UTC