§16 — Custom colour schemes registerColorScheme · forBin · forValue · schemes appear in every toolbar palette picker
Call registerColorScheme(name, { forBin, forValue }) before rendering to add a custom palette. Registered schemes appear automatically in every toolbar colour picker alongside the built-in ones. forBin(bin) returns a CSS colour for categorical bin modes; forValue(t) interpolates a colour for continuous value modes (t ∈ [0, 1]). The three cards show the built-in color and plasma schemes alongside the custom teal-rose scheme registered in this demo.
'color' (built-in default)
Categorical palette — visually distinct bins, Viridis for continuous values.
'plasma' (built-in)
Plasma colormap — high-contrast gradient for continuous parametric data.
'teal-rose' (custom)
Registered with registerColorScheme() — teal pass · rose fail palette. Available in the toolbar automatically.