Edit This Code:
<!DOCTYPE html>
<html>
<body>

<p>Click the button to create a Color picker.</p>

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

<script>
function myFunction() {
    var x = document.createElement("INPUT");
    x.setAttribute("type", "color");
    document.body.appendChild(x);
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy