How can I change the color of An instantiated Object?

I need to change the color of one material because it is attached to many objects and I need them all to change.

because all of these objects are instantiated prefabs so they have a limited life..

renderer.material.color = Color.red; or any script like that does not work

try this and apply it to the prefab that will be instantiated:

function Start(){

renderer.material.color = Color(Random.Range(0.0,1.0),Random.Range(0.0,1.0), Random.Range(0.0,1.0));

}

Hope i was helpful.

If you want to change the color of a material in unity 3d please see this link

This is for runtime

http://solution2tech.blogspot.in/2013/11/change-game-object-material-color-in.html