unity change text color

C#
// To change the color of a text, see below
GameObject.GetComponent<Text>().color = Color.black;
Source

Also in C#: