<!DOCTYPE html>
<html>
<body>

A color picker: <input type="color" id="myColor" autofocus>

<p>Click the "Try it" button to find out if the color picker automatically gets focus when the page loads.</p>

<button onclick="myFunction()">Try it</button>

<p><strong>Note:</strong> input elements with type="color" do not show any colorpicker in Internet Explorer and Safari.</p>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("myColor").autofocus;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>