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

PaletteOptions

What definePalette takes.

Type Parameter
Ramps extends Readonly<Record<string, PaletteRampOptions>>
Property Type Default value Description
darkerShade? number -0.22 The shade of each ramp’s darkest colour added below it.
hueShift? number 0.18 The share of the shorter arc toward that hue a shade’s hue moves per unit of its amount: at 0.18 a full shade moves it 18% of the way, and a shade of 0.5 moves it 9%.
lighterShade? number 0.16 The shade of each ramp’s lightest colour added above it.
lightHueRadians? number 0.96, 55 degrees, a warm yellow The HSL hue a light’s hue is pulled toward, in radians.
lightnessShift? number 0.42 The HSL lightness a shade moves for each unit of its amount.
lightSaturationShift? number -0.25 The same for a light: -0.25 makes a full light 0.75 times as saturated.
ramps Ramps undefined Each ramp’s colours as CSS hex, "#1f3a2c", darkest first. A single colour, such as an outline’s, is a ramp of one.
shadowHueRadians? number 4.276, 245 degrees, a violet blue The HSL hue a shadow’s hue is pulled toward, in radians.
shadowSaturationShift? number 0.15 How much a shadow’s saturation scales per unit of its amount: 0.15 makes a full shadow 1.15 times as saturated.