Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Intent to Prototype: CSS Color for Color Input Value

139 views
Skip to first unread message

Chromestatus

unread,
May 7, 2025, 7:16:06 PMMay 7
to blin...@chromium.org, lwa...@igalia.com

Contact emails

lwa...@igalia.com

Explainer

None

Specification

https://html.spec.whatwg.org/multipage/input.html#update-a-color-well-control-color

Summary

The HTML color input historically only supported 6 digit hex values for the value attribute. This feature changes that to support the much wider range of color syntaxes supported by CSS. Importantly the value will still be serialized as a hex when retrieving the value or during form submission, this is for backwards compatibility.



Blink component

Blink>Forms>Color

Motivation

The HTML color input historically only supported 6 digit hex values for the value attribute. This feature changes that to support the much wider range color syntaxes supported by CSS. This matches other features such as canvas which already support a wider range of color syntaxes.



Initial public proposal

None

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

There's a risk that not all browsers support this change which would lead to interoperability issues where in unsupporting browsers the color input fallsback to a black value. This risk is low as this change has already shipped in Safari.



Gecko: No signal

WebKit: Shipped/Shipping (https://webkit.org/blog/16900/p3-and-alpha-color-pickers) Shipped alongside the alpha and colorspace attributes.

Web developers: Positive Developers are positive on the overall enhancements to the color input which includes this change alongside the alpha and colorspace attributes.

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Is this feature fully tested by web-platform-tests?

Yes

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



Flag name on about://flags

Experimental Web Platform features

Finch feature name

ColorInputCSSValue

Requires code in //chrome?

False

Tracking bug

https://crbug.com/416245392

Availability expectation

Feature is available on Web Platform Baseline within 12 months of launch in Chrome.

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5099982692286464?gate=5205863274643456

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages