Skip to content

alpha attribute for <input type="color"> #1049

@mayank99

Description

@mayank99

Description

The <input type="color"> element allows using the built-in (browser or OS level) color picker. This built-in picker has historically not allowed the user to manipulate the alpha channel of the color.

The alpha attribute fixes this, typically by exposing an "opacity" slider inside the picker and letting authors use color values with alpha channel.

<input type="color" alpha>

Note: There is also a colorspace attribute which would be nice to have as well. Both of these features tend to get worked on together, it seems.

Specification

https://html.spec.whatwg.org/multipage/input.html#attr-input-alpha

web-feature

No response

Test Links

https://wpt.fyi/results/html/semantics/forms/the-input-element/color-attributes.window.html

Additional Signals

WebKit (already shipped in 18.4): https://bugs.webkit.org/show_bug.cgi?id=281284
Chromium: https://issues.chromium.org/issues/368059226
Mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1919718 and mozilla/standards-positions#1230

Blog post from WebKit: https://webkit.org/blog/16900/p3-and-alpha-color-pickers/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions