# \[SOLVED\] Change Color of particleSystem

**URL:** <https://forum.playcanvas.com/t/solved-change-color-of-particlesystem/21083>\
**Category:** Help & Support\
**Created:** [July 14, 2021, 5:34am UTC](https://forum.playcanvas.com/t/solved-change-color-of-particlesystem/21083 "2021-07-14T05:34:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Leonidas](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/leonidas/32/6495_2.png) [@Leonidas](https://forum.playcanvas.com/u/Leonidas)\
**Post date:** [July 14, 2021, 8:55am UTC](https://forum.playcanvas.com/t/solved-change-color-of-particlesystem/21083/2 "2021-07-14T08:55:59Z")

</div>

Hi @Gurki,

Yeah, that’s an internal API, not sure if changing the particles color on runtime is exposed on a public API.

In any case, if that works for you to change all RGB values do this:

```javascript
this.entityParticleEngine.particlesystem.colorGraph.curves[0].keys[0][1] = red;
this.entityParticleEngine.particlesystem.colorGraph.curves[1].keys[0][1] = green;
this.entityParticleEngine.particlesystem.colorGraph.curves[2].keys[0][1] = blue;

```

And at the end I think you still need to rebuild the graph, do check this if it’s required.

> [@ParticleSystem change color on runtime](https://forum.playcanvas.com/t/particlesystem-change-color-on-runtime/1653/2):
>
> Yeah, I think all the graphs are converted into textures to use in the shader. I don’t think there is an “API” way to update the graphs at runtime. If you call the internal methods entity.particlesystem.rebuild() or entity.particlesystem.rebuildGraphs()` that should work, though I can’t guarantee those methods will remain in the future…

---

_[View the full topic](https://forum.playcanvas.com/t/solved-change-color-of-particlesystem/21083)._
