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

Code Example 1

public class colorTint : MonoBehaviour
    public List<Color> TintColors;
    // Start is called before the first frame update
    void Start()

            Color c = TintColors[Random.Range(0, TintColors.Count)];

            GetComponent<Renderer>().material.color = c;

Learn ReactJs, React Native from