Enhance <input type=color> with alpha and colorspace=display-p3
Categories
(Core :: DOM: Forms, enhancement)
Tracking
()
People
(Reporter: annevk, Assigned: saschanaz)
References
(Blocks 5 open bugs, )
Details
(Keywords: dev-doc-needed, parity-safari, Whiteboard: [platform-feature][webcompat:risk-low], [wptsync upstream])
Attachments
(4 files, 1 obsolete file)
Updated•1 year ago
|
Comment 1•1 year ago
|
||
The spec PR has been merged.
This is needed to be able to pick display-p3 colors with the eyedropper as <input> proposal.
Updated•9 months ago
|
Comment 2•7 months ago
|
||
:hsinyi, do you have any idea when this feature will be available ?
| Assignee | ||
Comment 3•7 months ago
|
||
We need bug 1629388 to have some control over color picker.
Updated•5 months ago
|
Updated•4 months ago
|
Updated•2 months ago
|
| Assignee | ||
Comment 6•1 month ago
|
||
| Assignee | ||
Comment 7•1 month ago
|
||
| Assignee | ||
Comment 8•1 month ago
•
|
||
Removing some dependencies:
- The graphic dependency is about picker but we can still implement the attribute without actually having P3 picker. We can convert sRGB value from picker to P3 representation to fulfill the spec requirements. Users would still be only able to choose within sRGB range though. Using P3 for the picker is straightforward but right now doing so is no-op, as it turns out that we don't do color mapping - gradient in P3 white-to-red looks exactly same to sRGB white-to-red even on MacBook P3 display.
- In the same way, technically we don't have to fix the Android color picker to implement this. Alpha should be disabled until Android gets the picker support though, for feature detection purpose. The Android work would need some actual Android person to take. (gamut detection is possible through
matchMedia("(color-gamut: p3)").matches.)
| Assignee | ||
Comment 9•1 month ago
|
||
| Assignee | ||
Comment 10•29 days ago
|
||
Updated•28 days ago
|
Updated•28 days ago
|
Updated•28 days ago
|
Updated•25 days ago
|
Updated•24 days ago
|
| Assignee | ||
Comment 11•23 days ago
|
||
note: there should be tests to ensure that setting colorspace/alpha HTML attributes via setAttribute also runs value sanitization.
| Assignee | ||
Comment 12•23 days ago
|
||
I realized that this should not be specific to IDL setter.
| Assignee | ||
Updated•23 days ago
|
| Assignee | ||
Updated•22 days ago
|
| Assignee | ||
Comment 13•22 days ago
•
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]: Implementing extra attributes for input element
[Affects Firefox for Android]: Yes
[Suggested wording]: Adding colorspace HTML attributes for <input type=color> elements will now affect the value to be expressed in the requested colorspace and/or with alpha. They do not affect the color picker behavior yet, but it's coming in bug 2007532. alpha is Nightly only for now.
[Links (documentation, blog post, etc)]:
| Assignee | ||
Comment 14•22 days ago
•
|
||
For MDN/BCD purpose, we currently mark it incomplete for color() syntax support in HTML input element. We can mark it complete. The alpha value will be filtered out until it's enabled in stable...
Comment 15•22 days ago
|
||
Comment 17•22 days ago
|
||
Comment 18•22 days ago
|
||
Backed out for causing reftest failures @transformations-1.html.
| Assignee | ||
Comment 19•22 days ago
|
||
Huh? How come is this Android specific?
Comment 20•22 days ago
|
||
| Assignee | ||
Comment 21•22 days ago
|
||
Thanks, then it makes much more sense.
| Assignee | ||
Comment 22•22 days ago
|
||
(But it doesn't fail locally, it even gives 0 pixel difference. π€)
Comment 24•21 days ago
•
|
||
Just want to point out that the current plan to ship the attributes without the picker behaviour does mean that feature detection is effectively impossible. I think it's less important for color space but for alpha especially it seems problematic to advertise support when you don't have it. If I wanted to decide whether to show a custom picker or use the default browsers one this means I can't do that.
At the very least it would seem good if alpha was wired up to the platform pickers where possible before the web picker ships (macOS's and GTKs definitely support it).
| Assignee | ||
Comment 25•21 days ago
|
||
I thought about not shipping alpha, but changed my mind after realizing that alpha does affect the value too and is not fully unusable without alpha slider... But probably alpha should be behind pref for now, yeah. Thank for the feedback.
Comment 26•21 days ago
|
||
Updated•21 days ago
|
Comment 28•21 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/adbed6a1d5fb
https://hg.mozilla.org/mozilla-central/rev/1a3672c20420
https://hg.mozilla.org/mozilla-central/rev/dcf5f918e1fc
Comment 30•17 days ago
|
||
Added with this wording::
You can now set specific color spaces and transparency (alpha) on
<input type="color">elements, with alpha support currently exclusive to Firefox Nightly. While the visual picker hasn't changed yet (tracked in Bug 2007532), it will now output values in your requested format.
The note will be part of the Nightly release notes for 3 cycles (149-151).
When we extend the support to the release channel, a new release note request will be needed.
Description
•