Disable and enable a color picker:
<!DOCTYPE html> <html> <body> <input type="color" id="myColor"><br><br> <button onclick="disableBtn()">Disable Color Picker</button> <button onclick="enableBtn()">enable Color Picker</button> <script> function disableBtn() {//from ww w . j a va 2 s . c o m document.getElementById("myColor").disabled = true; } function enableBtn() { document.getElementById("myColor").disabled = false; } </script> </body> </html>