Bug 204476

Summary: Web Inspector: limit P3 colors to two decimals
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED MOVED    
Severity: Normal CC: hi, inspector-bugzilla-changes, nvasilyev
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 203534    
Attachments:
Description Flags
Patch none

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>.