Cycling particle colors through gradients

Here’s an ICE tree that uses a simple two-state setup to gradually move particle colors through two gradients (in State 0, the gradient is from black to white, and in State 1, from white to black). Randomizing the End Time gives me some variation between particles, and I customized the Modify Particle Colors to use “time in state” so I could use that as the trigger test.
ModifyParticleColor-w-StatesIn the Modify Particle Color compound, I simply swapped Get Particle Age for Get Time in State.