<input type="color">

Example

Usage

<input type="color" id="color" value="#0471A6" />

Description

The color type allows the user to select a hex colour value by using the browsers native picker. The interface can vary depending on the device and operating system.

Only hex values are valid. There is no support for CSS colour names (black), function colours (hsl(200, 95%, 33%)) or any alpha channel (#0471A688).

This can also be combined with <datalist> in supported browsers to provide some preset colours to pick from.