unity set material color

C#
//Gets the renderer material and sets color
object.GetComponent<Renderer>().material.color = newColor;
Source

Also in C#: