var i = 255;
var speed = 2;          //色変化のスピード

function grad(){
    if(i <= 0){
        clearTimeout(timerID);
    }
    else{
        i -= speed;
    
        //文字変化を指定
        msg.style.color = i+i*256+i*256*256;
        //idを変えれば好きなだけ増やせる
        
        //文字変化のスピード
        timerID = setTimeout("grad()",1);}
}