<form name="myForm" action="http://www.PuStudy.Com/resources/html-forms-action.html"> <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 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.