- From: Kari Pihkala via GitHub <noreply@w3.org>
- Date: Tue, 07 Oct 2025 13:33:42 +0000
- To: public-svg-issues@w3.org
[`color-interpolation`](https://www.w3.org/TR/SVG2/painting.html#ColorInterpolation) should be updated to say how wide gamut colors are interpolated. Web browsers already support the [`color()`](https://www.w3.org/TR/css-color-5/#color-function) function in SVGs, including SVG gradients. Unfortunately, they disagree how to render such gradients (most likely because SVG2 doesn't specify how to render them). [This example](https://jsfiddle.net/o9wmuvej/) shows an SVG gradient from `color(display-p3 1 0 0)` to `color(display-p3 0 1 1)` with different `color-interpolation` values. Screenshots from web browsers: <img width="2762" height="805" alt="Image" src="https://github.com/user-attachments/assets/c283be04-9b97-475c-a815-d13793b07a63" /> Notes about the results: Chrome renders P3 colors as P3 colors. Firefox and Safari seem to map P3 colors to sRGB. Safari 18 uses the default rendering for all three values because it [doesn't implement `color-interpolation`](https://bugs.webkit.org/show_bug.cgi?id=234783). There was some [discussion about deprecating `color-interpolation`](https://github.com/w3c/svgwg/issues/366#issuecomment-461408021). I don't know what is the status of that. Also, [`color-interpolation-filter`](https://drafts.fxtf.org/filter-effects/#ColorInterpolationFiltersProperty) is related to `color-interpolation` and should be updated, too. I wish that the current implementations are made consistent before new features are added. -- GitHub Notification of comment by karip Please view or discuss this issue at https://github.com/w3c/svgwg/issues/1021#issuecomment-3376922472 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 7 October 2025 13:33:43 UTC