DHTMLX Docs & Samples Explorer

dhtmlxColorPicker

Source
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxform_dhx_skyblue.css">
    <link rel="stylesheet" type="text/css" href="../../../dhtmlxColorPicker/codebase/dhtmlxcolorpicker.css">
    <script src="../../codebase/dhtmlxcommon.js"></script>
    <script src="../../../dhtmlxColorPicker/codebase/dhtmlxcolorpicker.js"></script>
    <script src="../../codebase/dhtmlxform.js"></script>
    <script src="../../codebase/ext/dhtmlxform_item_colorpicker.js"></script>
    <script>
var myForm,
formData;
function doOnLoad() {
    formData = [{
        type: "settings",
        labelWidth: 70
    }, {
        type: "colorpicker",
        name: "Color",
        label: "Color:",
        value: "#345abc",
        imagePath: "../../../dhtmlxColorPicker/codebase/imgs/",
        enableCustomColors: "1",
        customColors: "#303030,#909090,#f0f0f0"
    }, {
        type: "colorpicker",
        name: "Background",
        label: "Background:",
        value: "#6eea11",
        imagePath: "../../../dhtmlxColorPicker/codebase/imgs/"
    }];
    myForm = new dhtmlXForm("myForm", formData);
}
</script> <div id="myForm" style="height:330px;"></div>