Bug 223455

Summary: Web Inspector: support hwb() colors
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: ASSIGNED ---    
Severity: Normal CC: inspector-bugzilla-changes, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=221352

Description Nikita Vasilyev 2021-03-18 11:04:07 PDT
- Display color picker for hwb(...)
- Allow to convert to/from hwb(...)
- Autocomplete hwb() function
Comment 1 Radar WebKit Bug Importer 2021-03-18 11:04:17 PDT
<rdar://problem/75580962>
Comment 2 Sam Weinig 2021-03-18 17:48:51 PDT
If there is anything I can expose in WebCore to help this, let me know.
Comment 3 Nikita Vasilyev 2021-03-19 13:49:37 PDT
It would be nice to have DOM API to convert colors between HWB, HSL, RGB (both rgb(1,2,3) and #abc), and keywords (e.g. papayawhip). Currently, Web Inspector duplicates this logic on the front end in https://github.com/WebKit/WebKit/blob/main/Source/WebInspectorUI/UserInterface/Models/Color.js.
Comment 4 Sam Weinig 2021-03-20 11:51:09 PDT
Can the web inspector access things like window.internals? If not, maybe we should expose an object for the inspector and add some helpers on it for this (eventually I would like real DOM APIs for that, but it will take time)