Today I’m going to tell related to color picker in html. The HTML5 has many new features than HTML. It support <video>, <audio>, and <canvas> tags and also different input types support like input type=”text/date/color/…”. It look like Adobe Photoshop color picker. For selecting the color combination or single color, in PHP or HTML page we can easly use with input type=”color” . This is mainly used in ecommerce website or other marketing sites.
In HTML, input type=”color” is not support. We can’t see the color picker in HTML. Solve this problem in HTML5. More advantages and features are available in HTML5 than HTML.
The below example, shows how to use the color picker in html and shows the code output also. The HTML color picker to browse millions of colors. We can insert the selected colors to database. And also display the selected color or alert colors etc.
- Its very simple
- Can pick any color from screen
- Colors shown in hex and decimal
- Easy to use web development purpose
- Can more than one colors
- Works with Firefox, Internet Explorer, Photoshop and any other application
<h2>Color Picker Example</h2>
Choose Color 1: <input id="color1" name="color1" type="color" />
Choose Color 2: <input id="color2" name="color2" type="color" />
<input type="button" value="Submit" />
Color Picker Example
Choose Color 1:
Choose Color 2:
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.