Skip to content

colormap#width

Summary

colormap#width is the number of RGBA samples in the one-dimensional lookup table. For palette colormaps it equals the palette length; for stop-based colormaps it is the requested resolution after clamping to at least two samples.

Syntax

Colormap.width: number
const value = colormap.width;

Returns

number - Lookup-table sample count.

See Also