Skip to content

Function: buildColorscaleLUT() ​

ts
function buildColorscaleLUT(scale, size?, out?, space?): Uint8Array;

Experimental

Build the RGBA8 LUT for a colorscale: texel i holds the color at t = i / (size - 1), interpolated in space (default sRGB).

Parameters ​

ParameterTypeDefault value
scaleColorscaleundefined
sizenumberCOLORSCALE_LUT_SIZE
outUint8Array...
spaceColorscaleInterpolation'rgb'

Returns ​

Uint8Array

Released under the MIT License.