input type='color'
Published on
Need a color picker?
There is an eye dropper API that you could use to build your own.
Or, you could use <input type="color">
.
Here is one:
You can give it a default value if you’d like, using the value
attribute.
Dive deeper
As with most input types, it does have limited styling options, but that doesn’t mean you can’t style it at all.
And if you only want an eye dropper without a full color picker Chris Coyier has a quick post exploring the eye dropper API.