Check out example codes for "change olour in unity script". It will help you in understanding the concepts better.

Code Example 1

SpriteRenderer sr;

void Start()
{
	sr = GetComponent<SpriteRenderer>();
}
void Update()
{
	//This is a simple way of adding color
	sr.color = Color.red;
	//This is a more specific way of adding color
    sr.color = new Color(0/*Red*/,0/*Green*/,0/*Blue*/)
}

Learn ReactJs, React Native from akashmittal.com