WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 203695
Web Inspector: Color picker: incorrect saturation when selecting color on color square
https://bugs.webkit.org/show_bug.cgi?id=203695
Summary
Web Inspector: Color picker: incorrect saturation when selecting color on col...
Nikita Vasilyev
Reported
2019-10-31 13:43:57 PDT
Created
attachment 382496
[details]
[Image] Bug For instance, the top middle point of the color square should have: 100% saturation 75% lightness Instead, it shows: 50% saturation 75% lightness
Attachments
[Image] Bug
(247.58 KB, image/png)
2019-10-31 13:43 PDT
,
Nikita Vasilyev
no flags
Details
Patch
(5.93 KB, patch)
2019-10-31 13:49 PDT
,
Nikita Vasilyev
mattbaker
: review+
Details
Formatted Diff
Diff
Patch
(5.98 KB, patch)
2019-10-31 14:37 PDT
,
Nikita Vasilyev
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2019-10-31 13:44:09 PDT
<
rdar://problem/56793697
>
Nikita Vasilyev
Comment 2
2019-10-31 13:49:21 PDT
Created
attachment 382498
[details]
Patch
Matt Baker
Comment 3
2019-10-31 14:29:46 PDT
Comment on
attachment 382498
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=382498&action=review
r=me, looks good!
> Source/WebInspectorUI/UserInterface/Models/Color.js:270 > + }
Per our offline discussion, I agree that this reads closer to the conversion algorithm on Wikipedia: static hsv2hsl(h, s, v) { h = Number.constrain(h, 0, 360); s = Number.constrain(s, 0, 100) / 100; v = Number.constrain(v, 0, 100) / 100; let l = v - v * s / 2; let s; if (l === 0 || l === 1) s = 0; else s = (v - l) / Math.min(l, 1 - l); return [h, s * 100, l * 100]; }
Nikita Vasilyev
Comment 4
2019-10-31 14:37:00 PDT
Created
attachment 382502
[details]
Patch
WebKit Commit Bot
Comment 5
2019-10-31 15:26:19 PDT
Comment on
attachment 382502
[details]
Patch Clearing flags on attachment: 382502 Committed
r251885
: <
https://trac.webkit.org/changeset/251885
>
WebKit Commit Bot
Comment 6
2019-10-31 15:26:20 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug