i have a particle system hooked up to a color ramp so that the particles change color based their age. the only problem is once the reach a certain age they stay a certain color because the color ramp value becomes greater than 1. is there a math function to make the value progress back to 0 once it hits 1 and vice versa so the colors can continually cycle back and forth?
Sounds like you want a sine wave! Just multiply your incoming value by sin (with a multiplication node and sine node, respectively) and you'll get your oscillation of 0 to 1 and back again. There's some official documentation on just that use case here: https://docs.blender.org/manual/en/dev/compositing/types/converter/math.html#using-sine-function-to-pulsate
Then, add one 1, and divide the result by 2. This is a much smoother way of interpolating between 0 and 1 while avoiding negatives, as Rich Sedman suggested!