The input type colour supports the
listattribute, which allows you to define a preset list of options. The colours need to be defined as hexadecimal colours. They can be defined as values or text inside the
optiontags, but the values take precedence.
Pictured at the top of this post is how Chromium-browsers render the following snippet:
<input type="color" list="presets"></label> <datalist id="presets"> <option value="#cccccc">Grey</option> <option value="#ffffff">White</option> <option value="#6699cc">Blue</option> </datalist>
In his article he continues with dynamically adjust the colors to choose from, based on the color palette of an uploaded image.
UPDATE 2020-04-27: Turns out it’s also possible to limit the options for datepickers and range sliders: datalist experiment. (via)
Limiting input type=”color” to a certain palette (from an image) →