Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello I search in w3scools and found something thing call Html color picker and this is the link :
https://www.w3schools.com/colors/colors_picker.asp


I did not found the html code of color picker , so I want the html code to use this color picker in my page , so I want when the user pick any color from color picker to change the page color with the color which the user choice ... any help ?

What I have tried:

I search on google and the only result was w3scools ... in w3schools I did not found the html code , any help ?
Posted
Updated 6-Jul-17 8:40am

 
Share this answer
 
You can use input element to have a color picker on your page.
Something like following
HTML
<input type='color' />


Note: Check browser support for HTML5

Thanks :)
 
Share this answer
 
Comments
Richard Deeming 6-Jul-17 15:33pm    
Browser support isn't too bad, with IE and Safari the only notable holdouts:
Can I use... Color input type[^]

There's even a polyfill available:
Color polyfill[^]

However, the native UI in Firefox, Chrome and Opera on Windows is awful. MS Edge is significantly better.

For a decent and consistent UI, you probably still do need a plugin.
Suvendu Shekhar Giri 7-Jul-17 3:25am    
Yes. Agree!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900