Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Manoj Kumar on Oct 07, 2009 02:07
open dhtmlx forum
How to set default color in DHTMLX ColorPicker

I am using DHTMLX ColorPicker. if I am using getSelectedColor()[0] then it is returning "#5be516". I want default color should be white.
Answer posted by Stanislav (support) on Oct 07, 2009 09:47
a) you can set "selectedcolor" attribute to the element (input) to each colorpicker is attached
        <input selectedcolor="FFFFFF" ...

b) you can set color exactly after colorpicker creation

var cp = new dhtmlXColorPickerInput(...
cp.setColor("FFFFFF");