<!DOCTYPE html>
<html>
<body>
A color picker: <input type="color" id="myColor" value="#ff0080">
<p>Click the "Try it" button to display the default value of the color picker.</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").defaultValue;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>