Check documentation for the latest version of dhtmlxSuite setColor DHTMLX Docs

setColor

selects the defined color

void setColor(string|array color);
colorstring|arraythe value of a color

Example

myColorPicker.setColor([143,222,12]);
//or
myColorPicker.setColor("#8fde0c");
//or
myColorPicker.setColor("rgb(143,222,12)");

Details

3 variants of passing the value of a color:

  • a string in the Hex format like "#8fde0c";
  • a string in RGB format like "rgb(143,222,12)";
  • an RGB array like [143,222,12].
See also
Back to top