Get a colormap texture by name (built-in) or from custom LUT data.
when name === 'custom', customLut MUST be a Uint8Array of length
768 (RGB) or 1024 (RGBA). Invalid lengths log a warning and the function
falls back to the viridis built-in so the viewer keeps rendering
something sensible rather than silently disabling colormap mode.
Parameters
name: string
Colormap name. "custom" means use customLut parameter.
OptionalcustomLut: Uint8Array<ArrayBufferLike>
Optional Uint8Array(768) or Uint8Array(1024) for custom colormaps
Get a colormap texture by name (built-in) or from custom LUT data.
when
name === 'custom',customLutMUST be a Uint8Array of length 768 (RGB) or 1024 (RGBA). Invalid lengths log a warning and the function falls back to theviridisbuilt-in so the viewer keeps rendering something sensible rather than silently disabling colormap mode.