HTML <input type="color">
Example
Show a color picker (with a predefined red value):
Select your favorite color: <input type="color" name="favcolor"
value="#ff0000">
Try it Yourself »
Definition and Usage
The <input type="color"> defines a color picker.
The default value is #000000 (black). The value must be in seven-character hexadecimal notation.
Browser Support
The numbers in the table specify the first browser version that fully supports the element.
Attribute | |||||
---|---|---|---|---|---|
type="color" | 20.0 | 38.0 | 29.0 | 10.1 | 11.01 |
Syntax
<input type="color">