how to give color to an object in 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: how to change the color of an object in unity c# rgb
void Update ()
{
if(Input.GetKeyDown(KeyCode.R))
{
gameObject.GetComponent<Renderer>().material.color = new Color(233, 79, 55);
}
}