Function: densifyColorscale()
ts
function densifyColorscale(scale, space, resolution?): Colorscale;Experimental
Bake an interpolation space into a colorscale: sub-divide every segment between stops (about resolution segments over the whole 0–1 span, at least one per segment) with colors mixed in space, so plain sRGB interpolation between the new stops follows the space's curve (within about 1/255 at the default resolution). Hard steps (equal positions) stay hard. 'rgb' returns the scale unchanged.
Parameters
| Parameter | Type | Default value |
|---|---|---|
scale | Colorscale | undefined |
space | ColorscaleInterpolation | undefined |
resolution | number | 64 |