function Colorful(obj,font,r,g,b,type){
var boxObj;
if(typeof(obj)=="string"||typeof(obj) )=="number" ){
boxObj = document.getElementById(obj);
}else{
boxObj = obj;
boxObj.innerHTML="
" font "";
var num = boxObj.getElementsByTagName("a")[0].scrollWidth;
boxObj.innerHTML="";
for( var i=0;ivar j=i 1;
var c=Math.round(255/num*i);
switch(Number(type))
ケース 0: r=c;g=c;b=c;ブレーク;
ケース 1:r=c;ブレーク;
ケース 2:g=c;ブレーク; b=c;break;
}
var iObj = document.createElement("A");
iObj.style.clip="rect(auto " j " px auto " i "px )";
iObj.style.color="rgb(" r "," g "," b ")";
iObj.href="#";
boxObj .appendChild(iObj);
}
}