How to change Paricles color during an amination

I am simulating particles flowing in a pipe. I use blender cycles to render.
I want BLUE particles at the inlet of the pipe,to progressively turn RED toward the exit of the pipe. Thus creating a gradien of color along the pipe.
I have tried to animated the color of the sphere I use to render the particles, but the results is not what I want as all the particles in the pipe copy the color of the sphere at the current frame.
Please anyone could help ?

Quite simple… Particle Info node. Age divided by Lifetime produces a factor which allows you to make the material of the particles evolve from the time of their birth to their death… individually, of course.

Something like this:

This node tree gives you something like that:

thanks for the hint, and was busy with some other think hence the time it took mw to revert to you. I tried the node network, but my paricles color kept the same color during the whole simulation. It looks like the ration age/lifetime was zero all the time.
My question are :
How does the particle info node detecte a specific particle system ?
To which object do you affect the material you defined using the note network ?
Thanks again

7 months! Almost a necropost… :smiley:

The material must be applied to the particle object, of course. What else?

Follow the link I gave, expand the description and follow the link to the file. You’ll see exactly this material in action.

Thanks soo much
I got it … 7 moths later