DHTMLX Docs & Samples Explorer

dhtmlxColorPicker

Source
<!DOCTYPE html>
<html>
<head>
	<title>dhtmlxColorPicker</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		var myForm, formData;
		function doOnLoad() {
			formData = [
				{type: "settings", labelWidth: 70},
				{type: "colorpicker", name: "Color", label: "Color:", value: "#2a87eb", enableCustomColors: "1", customColors: "#ff9f29,#a3ff2b,#57cdff,#fb26ff,#9f96ff"},
				{type: "colorpicker", name: "Background", label: "Background:", value: "#6eea11"}
			];
			myForm = new dhtmlXForm("myForm", formData);
		}
	</script>
</head>
<body onload="doOnLoad();">
	<div id="myForm" style="height:330px;"></div>
</body>
</html>