[SOLVED] How pick particle color from list?

Does particles support applying specific color? i whant to pick random color from list [ “#58D2FF”, “#61EDFF”, “#26FFE2”] to white blob texture.

Saw cofetti example, the how you do it

  1. create blob images with differently colored blobs
  2. add images to atlas
  3. pick atlas in emitter image property
  4. pick animation in emitter property (fx1, fx2, fx2)
  5. copy paste emitter like below (each emitter represent differently colored particle)

You can use particlefx.set_constant to set the color of them: API reference (Particle effects) | Defold

(It says solved but it may help someone later with the same question so answering here :slight_smile: )

1 Like

or you can use white blob texture and set color in emitter property. No need for separate textures.

2 Likes