HTML DOM Input Color disabled Property

The HTML DOM Input Color disabled property sets/returns whether Input Color is enabled or disabled.


Following is the syntax −

  • Returning boolean value - true/false
  • Setting disabled to booleanValue
inputColorObject.disabled = booleanValue

Boolean Values

Here, “booleanValue” can be the following −

trueIt defines that the input color is disabled.
falseIt defines that the input color is not disabled and it is also the default value.


Let us see an example of Input Color disabled property −

 Live Demo

<!DOCTYPE html>
<title>Input Color Disabled</title>
Color Picker: <input type="color" id="Color" disabled>
<button onclick="enableColorInput()">Enable Color Input</button>
<div id="divDisplay"></div>
   var divDisplay = document.getElementById("divDisplay");
   var inputColor = document.getElementById("Color");
   divDisplay.textContent = 'Color Input disabled: '+inputColor.disabled;
   function enableColorInput() {
      inputColor.disabled = false;
      divDisplay.textContent = 'Color Input disabled: '+inputColor.disabled;


This will produce the following output −

Before clicking ‘Enable Color Input’ button −

After clicking ‘Enable Color Input’ button −