alpha value not changing(gradual decrease) during runtime

hi …is that possible to decrease the alpha value during run time…this is the code i have used for decreasing alpha value bt itz not at all changing,bt red ,green,blue values are changing during runtime. i want to change the alpha value form 0 to 255 or vice versa during runtime.below is the code i used.thanks in advance.help needed

void Start () {
	color	color = renderer.material.color;
	colortemp = 255;
	}
void Update () {
		
		colortemp -= 1f;
		color.a = colortemp;
  renderer.material.color = new Color(255,255,255,colortemp);
}

if i replace 255 with colortemp ,its is changing during run time.but,the alpha value is not changing during runtime.
thanks in advance

The Color class expects all parameters to be between 0…1, not 0…255.

Note you can use Color32 instead.