color unity code example
Example 1: unity change text color
// To change the color of a text, see below
GameObject.GetComponent<Text>().color = Color.black;
Example 2: hex color unity
ColorUtility.TryParseHtmlString (hexString, out color);
Example 3: new color unity
Color color = new Color(red,green,blue,alpha)//Alpha 0 is transparent