Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

definePalette

definePalette<Ramps>(paletteOptions): Palette<Ramps>

Declares a palette at module scope: ramps of colours dark to light, and the hue a shade is pulled toward, so every pixel texture and sprite painted from it shades as one hand painted them. Checks each colour and each ramp’s order here, throwing with the ramp’s name.

Type Parameter
Ramps extends Readonly<Record<string, PaletteRampOptions>>
Parameter Type
paletteOptions PaletteOptions<Ramps>

Palette<Ramps>