I haven’t tried your but this always works for me:
transform.renderer.material.color = Color.red;
But also you make a mistake:
You can define a color like this: Color(1,0.5,0,0);
If you want to use 256 bit color system then you need to divide “1” to “255”
For example: Color(255/255, 255/255, 255/255, 255/255);
But for white color, I advise you to just say:
Color.white;