Changing individual particle color based on distance to actor

Hi guys,

I’m trying to change the color of individual particles in Niagara based on the distance of the player character to that individual particle. Right now I have the entire system changing color based off of a simple if statement.

I want to change this to change the individual particle color instead of the color of the whole system and I would like it to be a smooth gradient between multiple colors like pictured here.

I think this might be a job for particle materials but I don’t know if it can work like I want it to. Any help is appreciated as I’m pretty new to Niagara.