Search code examples
javascriptmacoscolor-picker

how do they use the native mac color-picker on this page : http://beta.theexpressiveweb.com/#!/css3-gradients


http://beta.theexpressiveweb.com/#!/css3-gradients

On mac, chrome or firefox, it uses native color-picker to change color. How ?


Solution

  • It's just HTML5 input type called color:

    <input type="color">
    

    More HTML5 input types you can find at MDN.

    See jsFiddle demo. Works only in modern browsers.