Build a smooth color ramp from discrete color stops.
Creates a linearly interpolated gradient between the provided colors.
colors
[r0, g0, b0, r1, g1, b1, ...]
num_steps
Uint8Array of interpolated colors [r0, g0, b0, r1, g1, b1, ...]
Build a smooth color ramp from discrete color stops.
Creates a linearly interpolated gradient between the provided colors.
Parameters
colors: Uint8Array of color stops[r0, g0, b0, r1, g1, b1, ...]Must have at least 2 colors (6 bytes).num_steps: Number of output colors to generateReturns
Uint8Array of interpolated colors
[r0, g0, b0, r1, g1, b1, ...]