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.