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

Palette

A palette definePalette returns: its ramps and the shift every shade of it takes.

Type Parameter Default type
Ramps extends Readonly<Record<string, PaletteRampOptions>> Readonly<Record<string, PaletteRampOptions>>
Property Modifier Type Description
ramps readonly { readonly [Ramp in string | number | symbol]: readonly [number, { readonly [Step in string | number | symbol]: number }, number] } Each ramp’s colours, packed, darkest first: the darker shade, the colours as declared, then the lighter shade, so a ramp of six holds eight.

shade(color, amount): number

color shaded by amount, from -1 to 1, in HSL: below 0 darker, more saturated and pulled toward the shadow hue, above 0 lighter, less saturated and pulled toward the light hue. A grey keeps no hue to pull.

Parameter Type
color number
amount number

number