How to change particle system's "color over lifetime" by script?

Simply description of my question:

I have a particle(attached a particle system to an empty game object) and I already set the “Color over Lifetime” attribute in inspector.
Now I want to reset the “Color over lifetime” to another pattern after an event is triggered.

the problem is that:
I can’t find any variables and functions could be used directly finish the job. Is there any?

I tried to attach ParticleAnimator to the same gameObject but it doesn’t work.
Is there any good way to solve the problem? Or should I get all the particles emitted by the system and adjust them one by one in my script?

The pic below shows how i set the ParticleSystem and ParticleAnimator. But the particle remains green and yellow. Did I do something wrong?
Help!!! Thank you very much.

Just using script it seems that you cant set the “color over lifetime” color, either for each individual particle, or for the whole particle system.

However, you can set the color for each individual particle, and use your own “color over lifetime” Lerp calculation.

		ParticleSystem m_currentParticleEffect = (ParticleSystem)GetComponent("ParticleSystem");
		ParticleSystem.Particle []ParticleList = new    ParticleSystem.Particle[m_currentParticleEffect.particleCount];
        m_currentParticleEffect.GetParticles(ParticleList);
        for(int i = 0; i < ParticleList.Length; ++i)
        {
			float LifeProcentage = (ParticleList_.lifetime / ParticleList*.startLifetime);*_

_ ParticleList*.color = Color.Lerp(Color.clear, Color.red, LifeProcentage);
}*_

* m_currentParticleEffect.SetParticles(ParticleList, m_currentParticleEffect.particleCount);*
*This is probably very expensive if the effect as lots of particles, so its maybe not a suitable sollution for all systems. *