The collection of colors to interpolate. If a color has a falsy channel for example black has an undefined hue channel some interpolation methods may return NaN affecting the final result or making all the colors in the resulting interpolation gray.
Optional overrides to customize parameters such as interpolation methods and per channel eeasings.
An array of interpolated color tokens.
Interpolates the passed in colors and returns a color scale that is evenly split into
numamount of samples.The interpolation behaviour can be overidden allowing us to get slightly different effects from the same
baseColors.The behaviour of the interpolation can be customized by:
Changing the
kindof interpolationChanging the easing function (
easingFn)To create a color scale for cyclic values pass
trueto theclosedparameter in theoptionsobject.If
numis 1 then a single color is returned from the resulting interpolation with the internaltvalue at0.5else a collection of thenumof color scales is returned.If the collection of colors contains an achromatic color, the resulting samples may all be grayscale or pure black.