Skip to content

sampleRamp

sampleRamp(ramp, count): Oklab[]

Defined in: packages/math-color/src/color-ramp.ts:51

count colours evenly spaced along a ramp, ends included.

The discrete form, for a fixed number of categories or ranks. A single sample takes the midpoint rather than an end, since neither end is more representative than the other.

ColorRamp

number

Oklab[]

When count is not a positive integer.