hex=new Array(0,0,1,2,3,4,5,6,7,8,9,"A","B","C","D","E","F");
function convertir_hex(dec){
if (dec<16){ dec=16; }
grand=dec/16;
chaine=grand.toString();
chaine=chaine.substring(0,2);
grand=parseInt(chaine,10);
gauche=hex[grand+1];
petit=dec-grand*16;
if (petit<1){ low=1; }
chaine=petit.toString();
chaine=chaine.substring(0,2);
petit=parseInt(chaine,10);
droite=hex[petit+1];
a_retourner=gauche.toString()+droite.toString();
return a_retourner;
}
function degrader(texte){
texte=texte.substring(0,texte.length);
couleur_v_=255;
mul=couleur_v_/texte.length;
for (id_1=0; id_1<texte.length; id_1++){
couleur_v_=255*Math.sin(id_1/(texte.length/3));
couleur_v=convertir_hex(couleur_v_);
couleur_b_=mul*id_1;
couleur_b=convertir_hex(couleur_b_);
id_2=texte.length-id_1;
if (id_2<0){ id_2=0; }
couleur_r_=mul*id_2;
couleur_r=convertir_hex(couleur_r_);
document.write("<font color=\"#"+couleur_r+couleur_v+couleur_b+"\">"+texte.substring(id_1,id_1+1)+"</font>");
}
}