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