Skip to content

Function: colormapFromStops() ​

ts
function colormapFromStops(stops): (t) => RGB;

Defined in: color/colormap.ts:216

A sampler for a custom ramp given as anchor colours (evenly spaced, linearly interpolated). Accepts [r,g,b] triples in 0..1 or CSS hex strings.

Parameters ​

ParameterType
stopsreadonly (string | RGB)[]

Returns ​

(t) => RGB

MIT licensed. WebGL2 required.