Particle color manipulation

I have a particle animation (using PointsMaterial) that doesn’t show the depth too well.
I want to set the color the each particle seperate so there is an appearance of depth. How can this be achieved?

Depends on your goal, but here is an example for some ideas: How to make particles change shape when distance from the viewer or camera is too large? - #2 by prisoner849
Shape of a particle changes in accordance to depth in camera space.
The line, that controls interpolation factor: distRatio = smoothstep(25., 75., -mvPosition.z);;