Цветовая палитра
(custom)
<script type="text/javascript" src="../js/farbtastic.js"></script>
<link rel="stylesheet" href="../css/farbtastic.css" type="text/css" />
<div id="InfoBlockColorBorder" style="margin: 0 auto;"></div>
<script language="javascript">
function cutHex(h) {return (h.charAt(0)=="#") ? h.substring(1,7):h}
function HexToR(h) {return parseInt((cutHex(h)).substring(0,2),16)}
function HexToG(h) {return parseInt((cutHex(h)).substring(2,4),16)}
function HexToB(h) {return parseInt((cutHex(h)).substring(4,6),16)}
function decToHex(number) { if (number < 0) { number = 0xFFFFFFFF + number + 1; }
return number.toString(16).toUpperCase(); }
$('#InfoBlockColorBorder').farbtastic( function (color) {
r = HexToR(color);
g = HexToG(color);
b = HexToB(color);
$.get("/objects/?object=InformationBlockSettings&op=set&p=Red&v="+r);
$.get("/objects/?object=InformationBlockSettings&op=set&p=Green&v="+g);
$.get("/objects/?object=InformationBlockSettings&op=set&p=Blue&v="+b);
$.get("/objects/?object=InformationBlockSettings&op=set&p=colorRGB&v="+cutHex(color));
});
$.get("/objects/?object=InformationBlockSettings&op=get&p=colorRGB", function (data) { $.farbtastic("#InfoBlockColorBorder").setColor("#"+data); });
</script>