//Based on script source - http://design.geckotribe.com/colorwheel/colorwheel.js //Color Wheel by Antone Roundy function getColor() { if(document.theme.mono.checked == true) { var hexcode; if(document.getElementById('hex')) { hexcode = document.getElementById('hex').value; } if(hexcode=="") {alert('No Color Selected'); return false; } r = HexToRGB(hexcode.substring(0,2)); g = HexToRGB(hexcode.substring(2,4)); b = HexToRGB(hexcode.substring(4,6)); SetColors(r,g,b); } } var grade6="0.8"; var grade1="0.6"; var grade2="0.25"; var grade3="0.667"; var grade4="0.333"; function SetColors(r,g,b) { ra=Math.round(r+(255-r)*grade1); ga=Math.round(g+(255-g)*grade1); ba=Math.round(b+(255-b)*grade1); rb=Math.round(r+(255-r)*grade2); gb=Math.round(g+(255-g)*grade2); bb=Math.round(b+(255-b)*grade2); rc=Math.round(r*grade3); gc=Math.round(g*grade3); bc=Math.round(b*grade3); rd=Math.round(r*grade4); gd=Math.round(g*grade4); bd=Math.round(b*grade4); rf=Math.round(r+(255-r)*grade6); gf=Math.round(g+(255-g)*grade6); bf=Math.round(b+(255-b)*grade6); colora="("+ra+","+ga+","+ba+")"; colorb="("+rb+","+gb+","+bb+")"; colorc="("+r+","+g+","+b+")"; colord="("+rc+","+gc+","+bc+")"; colore="("+rd+","+gd+","+bd+")"; colorf="("+rf+","+gf+","+bf+")"; document.getElementById('selc1').value=RGB2Hex(ra,ga,ba); document.getElementById('selc2').value=RGB2Hex(rb,gb,bb); document.getElementById('selc3').value=RGB2Hex(r,g,b); document.getElementById('selc4').value=RGB2Hex(rc,gc,bc); document.getElementById('selc5').value=RGB2Hex(rd,gd,bd); document.getElementById('selc1').style.backgroundColor='rgb'+colora; document.getElementById('selc2').style.backgroundColor='rgb'+colorb; document.getElementById('selc3').style.backgroundColor='rgb'+colorc; document.getElementById('selc4').style.backgroundColor='rgb'+colord; document.getElementById('selc5').style.backgroundColor='rgb'+colore; // document.getElementById('selc6').style.backgroundColor='rgb'+colorf; } //function HexToRGB(h) {return parseInt((cutHex(h)).substring(0,2),16)} //function cutHex(h) {return (h.charAt(0)=="#") ? h.substring(1,7):h} function HexToRGB(h) {return parseInt((h).substring(0,2),16)} hexdig='0123456789ABCDEF'; function Dec2Hex(d) { return hexdig.charAt((d-(d%16))/16)+hexdig.charAt(d%16); } function Hex2Dec(h) { h=h.toUpperCase(); d=0; for (i=0;i