natiny.particles.set_colors
natiny.particles.set_colors(particles, colors)
Sets how a particle's colour and alpha change over its life, as evenly spaced colours from birth to death.
Parameters
| Name | Type | Description |
|---|---|---|
particles |
number |
Particle system handle from natiny.particles.create |
colors |
table |
1 to 8 colours; an empty table or nil removes the gradient |
Example
local hex = natiny.color.from_hex
natiny.particles.set_colors(fire, { hex("#FFEE88FF"), hex("#FF6622CC"), hex("#33333300") })
Notes
- More than
8entries raise an error.