Colour and palettes
Presets control colour through a shared palette. A palette is a gradient baked once at load into a lookup table that the five shader-coloured scenes sample:
fragment_fieldswarmreaction_diffusionattractorshape_field— the one whose sample coordinate is a distance rather than a level, which is what makes banding it draw offset contours
All four line scenes sample the same LUT too, but on the CPU, once per segment rather than per pixel or per particle:
spectrum— see Spectrum — colour along the frequency axis.parametric_curve,lsystemandstar_patterncolour along their generator’s axis (ADR-0059) — see The line scenes — colour along the generator’s axis.
So every scene reaches [palette], and a note anywhere saying a [palette]
table is inert on a line scene is stale.
The backdrop reaches it too
(ADR-0086): the background pre-pass
samples the same baked LUT, so bg_hue is a coordinate in the preset’s own gradient — see
The backdrop. There is no longer any
surface in the engine that colours outside [palette], and a note saying bg_hue walks a fixed
cosine whatever the preset declares is stale.
A preset that declares no [palette] gets the default spectrum palette —
the exact iq cosine the scenes used before this system existed — so every shipped
preset renders unchanged. (The one exception: reaction_diffusion previously used
a slightly different cosine and was unified onto spectrum, so the coral presets’
colours shifted; they are being re-authored to exploit palettes.)
This is the authoring counterpart to
ADR-0021 and
Plan 0020. It documents colour only —
the systems, expression grammar, and file layout live in the main preset guide
(docs/presets.md).
Sections
- The [palette] table
- Bindable colour parameters
- Hard bands — palette_steps and palette_contour
- Limited ink — a supported palette class, at the draw seam
- The line scenes’ cosine ramp — what hue actually looks like
- A/B palette crossfade — [palette_b] + palette_mix
- One palette serves both layers — the [layer] rule
- Dark on light — the two-tone route
- Flat colour on shape_collage — stay under the knee
- Worked example — a cohesive warm fragment field
- Related documents
Built from a8ce055 at version 0.115.0. This site tracks main and is not versioned per release.