# Changing individual particle color based on distance to actor

**URL:** <https://forums.unrealengine.com/t/changing-individual-particle-color-based-on-distance-to-actor/477233>\
**Category:** FX\
**Tags:** unreal-engine, question\
**Created:** [January 14, 2021, 5:11am UTC](https://forums.unrealengine.com/t/changing-individual-particle-color-based-on-distance-to-actor/477233 "2021-01-14T05:11:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_a8b20f281](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a8b20f281](https://forums.unrealengine.com/u/anonymous_user_a8b20f281)\
**Post date:** [January 14, 2021, 5:11am UTC](https://forums.unrealengine.com/t/changing-individual-particle-color-based-on-distance-to-actor/477233/1 "2021-01-14T05:11:13Z")

</div>

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.

 ![327155-particle-colort.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/4/9442a022ecf023da84fb34b0254f77542c79b7cc.png)

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.

 ![327156-fireflies-gradient.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/9/4c99c0047786da388370d232b7eec8773c97af3e.jpeg)

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.
