unity color 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: new color unity
Color color = new Color(red,green,blue,alpha)//Alpha 0 is transparent
Example 3: unity particle system color
Color myColor;
gameObject.GetComponent<ParticleSystem>().startColor = myColor;