Bug 204476 - Web Inspector: limit P3 colors to two decimals
Summary: Web Inspector: limit P3 colors to two decimals
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords:
Depends on:
Blocks: 203534
  Show dependency treegraph
 
Reported: 2019-11-21 15:20 PST by Devin Rousso
Modified: 2022-02-10 15:55 PST (History)
3 users (show)

See Also:


Attachments
Patch (1.44 KB, patch)
2019-11-21 15:21 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-11-21 15:20:19 PST
# STEPS TO REPRODUCE:
1. inspect any page
2. add `color: color(display-p3 1 0 0);` property to any node
3. click the color swatch that appears before the `color(`
4. drag the dot around the color square
 => some values appear with more than two decimals
Comment 1 Devin Rousso 2019-11-21 15:21:22 PST
Created attachment 384096 [details]
Patch
Comment 2 Nikita Vasilyev 2019-11-21 16:34:12 PST
I agree that we should limit the number of decimals but I don't agree on allowing only two. Display-P3 color space is 10bit per channel. Allowing only two decimals for 0 to 1 values is quite limiting.

Re: bug title
This isn't just about P3, it's about color function, e.g. `color(SRGB 1 0 1)`.
Comment 3 Devin Rousso 2019-11-21 22:08:32 PST
Looks like this is handled by <https://webkit.org/b/203534>.