color
color
W3C Working Draft
Summary
The color type of the <input> element provides a widget for selecting a color value.
Overview Table
| DOM Interface | HTMLInputElement |
|---|
Examples
When viewed using a supporting user agent, the following example shows a field, usually indicating a red color. When clicked, a color picker shows up. Selecting a color would change the indicated color to the chosen color.
HTML
<input type="color" value="#ff0000"/>
Usage
Use this input type to let the user choose a color using a standard color picker.
Notes
- Currently, most user agents do not implement this input type. A customized implementation or poly-fill can usually provide a close alternative.
- The value can only express opaque colors, there is no support for an alpha channel/transparency.
Compatibility
Desktop
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic Support | 20 | Unsupported | Unsupported | 11.00 |
Unsupported |
Mobile
| Feature | Android | BlackBerry | Chrome for mobile | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Opera Mini | Safari Mobile |
|---|---|---|---|---|---|---|---|---|
| Basic Support | Unsupported | Supported (when?) | Unsupported | Unsupported | Unsupported | ? | Unsupported | Unsupported |
Compatibility notes
| Browser | Version | Note |
|---|---|---|
| Internet Explorer | 6 and later | For an alternative, non standard implementation, see ChooseColorDlg. |
This tool helps to make and review comments inline.
How to Use
insert instructions, with images, here