Check out example codes for "unity set material color". It will help you in understanding the concepts better.

Code Example 1

//Gets the renderer material and sets color
object.GetComponent<Renderer>().material.color = newColor;

Learn ReactJs, React Native from akashmittal.com