Check out example codes for "set particle system start colour + random between two". It will help you in understanding the concepts better.

Code Example 1

//Main Particle system attached to the thruster
ParticleSystem thrusterPS = thruster.GetComponent<ParticleSystem>();
var main = thrusterPS.main;
main.startColor = new ParticleSystem.MinMaxGradient(thrusterColour1, thrusterColour2);

Learn ReactJs, React Native from akashmittal.com