Bug 223458
| Summary: | Web Inspector: color-contrast() should have color swatch | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> |
| Component: | Web Inspector | Assignee: | Nikita Vasilyev <nvasilyev> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | CC: | inspector-bugzilla-changes, ntim, 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=222530 https://bugs.webkit.org/show_bug.cgi?id=223457 https://bugs.webkit.org/show_bug.cgi?id=204772 |
||
Nikita Vasilyev
I propose to add a read-only color swatch before `color-contrast`
[ ] color-contrast(var(--brand) 40%, white)
^
resulting color
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/75582067>
Sam Weinig
Would also be really cool to somehow expose the different contrast ratios being compared.
Nikita Vasilyev
Yeah, that would be nice.
I've worked on Bug 204772 - Web Inspector: Add text/background contrast ratio information to color picker. Unfortunately, I didn't finish it. If I add custom UI for color-contrast(), I should finish that patch 1st.
Sam Weinig
(In reply to Nikita Vasilyev from comment #3)
> Yeah, that would be nice.
>
> I've worked on Bug 204772 - Web Inspector: Add text/background contrast
> ratio information to color picker. Unfortunately, I didn't finish it. If I
> add custom UI for color-contrast(), I should finish that patch 1st.
It's too bad none of that math / color conversion code is using the version we have in WebCore. Is there a pattern we can establish to expose some of the functionality we have in the engine to the inspector so the math always lines up perfectly?
Tim Nguyen (:ntim)
We're removing color-contrast in bug 278864