Repository navigation
PaletteGradient API
Syntax-Sculptor edited this page Nov 24, 2026
·
3 revisions
A gradient that determines how a particle's color and transparency change throughout its lifetime.
Gradients can be accessed through the ColorOverLifetime module using its Gradient, GradientMin, and GradientMax fields, as well as the ColorBySpeed module's Gradient field.
| Property | Type | Default | Description |
|---|---|---|---|
AlphaKeys |
Keyframe<number>[] | {{Time = 0, Value = 1}, {Time = 1, Value = 1}} |
An array of alpha keyframes that determines how the particle's transparency changes throughout its lifetime. Timestamps are normalized between 0 and 1, representing the beginning and end of a particle's lifetime. |
ColorKeys |
Keyframe<KColor>[] | {{Time = 0, Value = KColor.White}, {Time = 1, Value = KColor.White}} |
An array of color keyframes that determines how the particle's color changes throughout its lifetime. Timestamps are normalized between 0 and 1, representing the beginning and end of a particle's lifetime. |
Note
Both ColorKeys and AlphaKeys contain keyframes with normalized timestamps ranging from 0 to 1, representing the beginning and end of a particle's lifetime.
Warning
Keyframes must be sorted by their Time values, from earliest to latest. Otherwise, the particle may exhibit unexpected behavior.
Note
The alpha component of a ColorKeys keyframe's KColor is ignored. Particle transparency is determined by AlphaKeys.
- Palette API
- Particle Emitter API
- AlignToVelocity API
- ColorBySpeed API
- ColorOverLifetime API
- ForceOverLifetime API
- InheritVelocity API
- Keyframe API
- LimitVelocityOverLifetime API
- Noise API
- PaletteBurst API
- PaletteGradient API
- PaletteOverLifetime API
- RotationBySpeed API
- ScaleBySpeed API
- Shape API
- SpriteSheet API
- SubEmitterOptions API
- VelocityOverLifetime API