[webkit-reviews] review denied: [Bug 203439] Web Inspector: Display color swatches for p3 colors : [Attachment 381980] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 30 13:53:05 PDT 2019
Devin Rousso <drousso at apple.com> has denied Nikita Vasilyev
<nvasilyev at apple.com>'s request for review:
Bug 203439: Web Inspector: Display color swatches for p3 colors
https://bugs.webkit.org/show_bug.cgi?id=203439
Attachment 381980: Patch
https://bugs.webkit.org/attachment.cgi?id=381980&action=review
--- Comment #5 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 381980
--> https://bugs.webkit.org/attachment.cgi?id=381980
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=381980&action=review
r-, we should have tests for this. You can add them to
'inspector/model/color.html'.
> Source/WebInspectorUI/UserInterface/Models/Color.js:51
> + const matchRegExp =
/^(?:#(?<hex>[0-9a-f]{3,8})|rgba?\((?<rgb>[^)]+)\)|(?<keyword>\w+)|color\(displ
ay-p3\s(?<p3>[^)]+)\)|hsla?\((?<hsl>[^)]+)\))$/i;
It looks like we also support `srgb`. We should make this more general to
support all the color spaces of the `color(...)` function.
> Source/WebInspectorUI/UserInterface/Models/Color.js:584
> + return `color(display-p3 ${r} ${g} ${b} ${alpha})`;
There should be a `/` before the `alpha`.
```
return `color(display-p3 ${r} ${g} ${b} / ${alpha})`;
```
More information about the webkit-reviews
mailing list