Цвет шрифта
(custom)
<script type="text/javascript" src="../js/farbtastic.js"></script>
<link rel="stylesheet" href="../css/farbtastic.css" type="text/css" />
<div id="headerInfoBlock" 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(); }
$('#headerInfoBlock').farbtastic( function (color) {
r = HexToR(color);
g = HexToG(color);
b = HexToB(color);
$.get("/objects/?object=InformationBlockSettings&op=set&p=textColorHeader&v="+cutHex(color));
});
$.get("/objects/?object=InformationBlockSettings&op=get&p=textColorHeader", function (data) { $.farbtastic("#headerInfoBlock").setColor("#"+data); });
</script>