

hex=204  // Initial color value.

function fadetext(){	         	

if(hex>0) {	

hex-=11; // increase color value

document.getElementById("sample").style.color="rgb("+hex+","+hex+","+hex+")"; // Set color value.

setTimeout("fadetext()",400);	

}

else

hex=255  //reset hex value

}


