coderef

<input type="color">Limited availability

The &#x3C;input type="color"> HTML element shows a color picker from which users can choose a color value.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–19Not supported
20+Supportedsince Jun 26, 2012
Current: 155
Edge
12–13Not supported
14+Supportedsince Aug 2, 2016
Current: 154
Firefox
1–28Not supported
29+Supportedsince Apr 29, 2014
Current: 157
Safari
1–12Not supported
12.1+Supportedsince Mar 25, 2019
Current: 27
MobileChrome Android
18–18Not supported
25+Supportedsince Feb 27, 2013
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
1–12Not supported
12.2+Supportedsince Mar 25, 2019
Current: 27

How to use

Not supported in Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: color.

Feature detection

JS · check before using
if ("type_color" in document.createElement("input")) {
  // the type_color attribute/property of <input> is supported
}