WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
252043
display-p3 isn't supported as interpolation color space
https://bugs.webkit.org/show_bug.cgi?id=252043
Summary
display-p3 isn't supported as interpolation color space
Melvin
Reported
2023-02-10 03:47:34 PST
When I try to use the color-mix() function in combination with the Display-P3 color function, the function breaks. This is because the first argument, the color-space, is not supported by the color-interpolation-method as defined in CSS Color Module 5. However, it seems like CSS Color Module 5 suggests that one can give a @color-profile as color-interpolation-method in the color-mix() function like this: color-mix(<dashed-ident>, <color> <percentage, <color>); Expected Behavior: The color-mix() function should work correctly with the Display-P3 color, creating a mix of two colors in the specified color-space. Or at least work correctly with dashed-ident's and custom @color-profile. Steps to Reproduce: Try to use the color-mix() function in combination with Display-P3 or @color-profile on Safari 16 or Technology Preview
Attachments
Add attachment
proposed patch, testcase, etc.
Tim Nguyen (:ntim)
Comment 1
2023-02-10 17:49:09 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?
Melvin
Comment 2
2023-02-11 10:44:38 PST
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.
Tim Nguyen (:ntim)
Comment 3
2023-02-11 10:50:50 PST
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?
Radar WebKit Bug Importer
Comment 4
2023-02-17 03:48:17 PST
<
rdar://problem/105591773
>
Matthieu Dubet
Comment 5
2024-02-05 15:25:32 PST
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
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug