← Back to release summary

Accept 8 (#RRGGBBAA) and 4 (#RGBA) value hex colors

Category
CSS
Type
New or changed feature
Status
Enabled by default (Chrome 62)
Intent stage
None

Summary

Update the CSS color parser to support 8/4-digit hex color. Legacy HTML attribute color parsing, per the "rules for parsing a legacy colour value" of the HTML micro syntax (http://bit.ly/1WF2Yre), will not be changed (see http://bit.ly/1UEDbiO), nor will the CSS hashless color quirk (https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk).

Standards & signals

Docs: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#rgba

Samples: https://codepen.io/malyw/pen/wGNOrd

View on chromestatus.com