|
Shake_JS选色器(14) var CircleMinR = 70; var CircleMaxR = 90; var EX,EY,l; var t; for(;CircleMinR <= CircleMaxR;CircleMinR+=4){ for(j = 0;j <= 359;j++){ EX = parseInt(CircleMinR * Math.sin(3.14*j/180)); EY = parseInt(CircleMinR * Math.cos(3.14*j/180)); t = nForColor(j); l = '<span class="img1px" H="'+j+','+CircleMinR+'" style="position:absolute; width:4px; height:4px; background:'+t+'; left:'+(CircleX+EX)+'px; top:'+(CircleY+EY)+'px;" onMouseDown="hidePoints();" onMouseUp="showPoints();getPointInfo(tModer.value);" onMouseOver="tColor1.style.background=\'\';tColor1.style.background=this.style.background;"></span>'; document.write(l); } } delete CircleMinR,CircleMaxR,EX,EY,l,t,j; } function nForColor(cNum){ var t = ''; if(cNum >= 300 && cNum <= 360){ cNum -= 300; t = parseInt(255-cNum*4.25).toString(16); if(t.length==1) t = '0' + t; t = 'FF00' + t; return(t); }else if(cNum >= 240 && cNum <= 300){ cNum -= 240; t = parseInt(cNum*4.25).toString(16); if(t.length==1) t = '0' + t; t += '00FF'; return(t); }else if(cNum >= 180 && cNum <= 240){ cNum -= 180; t = parseInt(255-cNum*4.25).toString(16); if(t.length==1) t = '0' + t; t = '00' + t + 'FF'; return(t); }else if(cNum >= 120 && cNum <= 180){ cNum -= 120; t = parseInt(cNum*4.25).toString(16); if(t.length==1) t = '0' + t; t = '00FF' + t; return(t); }else if(cNum >= 60 && cNum <= 120){ cNum -= 60; t = parseInt(255-cNum*4.25).toString(16);
|