Re: [csswg-drafts] [css-color] [filter-effects] Should no-op filters produce different output from no filter? (#7100)

So: given that

- SVG filters already operate in linear-light sRGB, and the sRGB to XYZ conversion matrix is [baked into the spec](https://drafts.fxtf.org/filter-effects/#attr-valuedef-type-saturate) with the saturation and luminance operators
  - but they assume 8-bit and hard clamp at 0 and 255 on each stage in the filter chain so can't do WCG
- _extended_, linear-light sRGB is [already defined in CSS color 4 as `srgb-linear]()`](https://drafts.csswg.org/css-color-4/#predefined-sRGB-linear) and _can_ represent wide color gamut colors, such as P3 colors
  - plus it is already proposed for use in Canvas for WCG
  - plus there is existing GPU hardware support for extended, linear-light sRGB
- [`color-interpolation filters` exists](https://drafts.fxtf.org/filter-effects/#ColorInterpolationFiltersProperty) in Filter Effects 1 with the values `auto | sRGB | linearRGB` and the initial value is `linearRGB`

Then I propose to extend `color-interpolation filters` to take an additional value with a definition link to CSS color 4, and that value is explicitly an extended, WCG space and has a 16-bit precision requirement.

Extended means that negative values, and values greater than 1.0, are allowed. For example `color(display-p3 0 1 0)`, which is outside the sRGB gamut, is `color(srgb-linear -0.225 1.0421 -0.079)`

This will add WCG support to SVG filters, is opt-in so existing content continues to render the same, and can also be opted into to get the improved precision (8 bits linear light has visible banding) even for sRGB-only content.

The new value could be `sRGB-linear` for compatibility with Canvas and with CSS Color 4, although above I suggested  `linearRGBextended` which I could also live with.

I'm guessing this would go in [Filter Effects 2](https://drafts.fxtf.org/filter-effects-2/) ?

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


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

Received on Tuesday, 19 April 2022 16:29:32 UTC