Post by ⓦ৹₪deⓡ on Dec 26, 2005 2:17:45 GMT -8
This code will change the default skin color picker to a color picker with thousands more colors. Do NOT PM me for requests or support, that's what the coding boards are for. Enjoy.
~Wonder
Main Footer
~Wonder
Main Footer
<script>
//Advanced Color Picker v1.0
//Copyright 12-26-2005 ~Wonder
//May be reposted anywhere as long as this header remains in tact
//Put in Main Footer
//Do not change this image unless you are replacing it with the exact same image
hexWheelUrl="http://img229.imageshack.us/img229/7030/colorchart3sn.png";
toChange="";
function jesusLovesYou(ob)
{
toChange=ob;
cp=window.open('', 'colorPopUp', config='height=200,width=195, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no');
cp.focus();
cp.document.write("<scr"+"ipt>hexColors=[[255,0,0],[255,255,0],[0,255,0],[0,255,255],[0,0,255],[255,0,255],[255,0,0]];function getHex(x,y){if(x<180){for(i=1;i<7;i++){if(x<i*30)break;}x=(x-((i-1)*30))/30;temp=new Array(3);for(j=0;j<3;j++){temp[j]=Math.round((1-x)*hexColors[i-1][j]+(x)*hexColors[i][j]);}}else{temp=[127,127,127];}temp=[[255,255,255],temp,[0,0,0]];c=new Array(3);i=(y<90)?1:2;y=(y-((i-1)*90))/90;for(j=0;j<3;j++){x=Math.round((1-y)*temp[i-1][j]+(y)*temp[i][j]).toString(16);c[j]=(x.length<2?\"0\":\"\")+x;}c=c.join(\"\").toUpperCase();x=document.getElementById(\"col\");x.style.backgroundColor=c; x=x.getElementsByTagName(\"font\");x[0].innerHTML=c;x[1].innerHTML=c;}function getXY(e){ posx = 0; posy = 0; if (!e) var e = window.event; if (e.pageX || e.pageY) { posx = e.pageX; posy = e.pageY; } else if (e.clientX || e.clientY) { posx = e.clientX; posy = e.clientY; } posx=(posx>195)?195:posx;posy=(posy>180)?180:posy;getHex(posx,posy);} function returnColor(){opener.changeColor(document.getElementById('col').getElementsByTagName('font')[0].innerHTML);window.close();}</scr"+"ipt><title>Click To Select</title><body onmousemove=\"getXY(event)\" topmargin=0 leftmargin=0 bottommargin=0 rightmargin=0> <div id=\"pos\" style=\"width:195; height:180; margin:0; padding:0;\"><img src=\""+hexWheelUrl+"\" onclick=\"javascript:returnColor()\" alt=\"Click To Select\"></div><div id=\"col\" style=\"width:195; height:20; margin:0; padding:0;\"><center><b><font color=\"FFFFFF\">FFFFFF</font> <font color=\"000000\">FFFFFF</font></b></center></div></body>");
}
function changeColor(temp)
{
eval("document.prefs."+toChange+".value='"+temp+"'");
}
if(document.prefs)
{
for(i=0;i<document.links.length;i++)
{
if(document.links[i].href.match(/popChart/i))
document.links[i].href=document.links[i].href.replace(/popChart/i,"jesusLovesYou");
}
}
</script>