HTML <input> Tag with 'type=color'
<form name="myForm" action="http://www.htmlcodes.ws/resources/html-forms-action.cfm">
<input type="color" name="myField">
<button>Submit</button>
</form>
The above example demonstrates usage of the <input>
element with the type
attribute set to color
(i.e. type="color"
).
The color
value represents a color well control, for setting the element's value to a string representing a simple color. This is an sRGB color with 8-bit red, green, and blue components.
Browsers will typically display a color picker that enables the user to select a color. The selected value is provided as a hexidecimal value.