rampCss

Returns the CSS colour at position t, 0 to 1, along a list of colour stops, blending linearly between neighbours.

@internote/canvas-sdkFunction
On this page
import { rampCss } from '@internote/canvas-sdk';

The blend is a color-mix(), so a stop that is a theme variable stays live. What a legend draws its gradient's samples with.

#Signature

(stops: readonly string[], t: number): string

#Parameters

stops
The colours from the low end to the high end, at least two.
t
The position along the range.

Declared in packages/canvas-sdk/src/paint/index.ts:224.

Last updated