Skip to content

Documentation / @ripl/core / interpolateColors

Function: interpolateColors() ​

interpolateColors(colors): ColorInterpolator

Defined in: packages/core/src/color/scales.ts:41

Builds a color interpolator from an array of color stops. Position 0 returns the first stop, 1 the last, and intermediate positions interpolate (RGBA, channel-wise) between adjacent stops.

Parameters ​

ParameterType
colorsstring[]

Returns ​

ColorInterpolator