| Summary: | display-p3 isn't supported as interpolation color space | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Melvin <melvin.idema30> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Trivial | CC: | heycam, m_dubet, ntim, sam, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Mac (Apple Silicon) | ||
| OS: | macOS 13 | ||
|
Description
Melvin
2023-02-10 03:47:34 PST
`data:text/html,<span%20style="color:%20color-mix(in srgb, color(display-p3%201%200.5%200)%2050%,%20transparent)">dfsdfsdfsdfdsf</span>` seems to work for me. Do you have a testcase that doesn't work for you? Thank you for your response Tim! In the provided example the color-space srgb is used instead of display-p3. The function breaks if you try to use display-p3. Like this: `data:text/html,<span%20style="color:%20color-mix(in display-p3, color(display-p3%201%200.5%200)%2050%,%20transparent)">dfsdfsdfsdfdsf</span>` In my original comment I described using a custom color space as value in color-mix however I now realize custom color spaces aren't yet supported. Ah right, it should work according to https://drafts.csswg.org/css-color/#interpolation-space , thanks! Sam, do you know if this is a known bug? Yes we don't support display-p3 yet as an interpolation method. https://github.com/WebKit/WebKit/blob/main/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp#L2894 |