Skip to content

color.map.grayscale

Summary

color.map.grayscale maps low values to black and high values to white. Use it for intensity data when hue would imply a second variable. Samples default to linear RGB, so encode them for CSS display or request "srgb" directly.

Syntax

WasmGPU.color.map.grayscale(): Colormap
const result = wgpu.color.map.grayscale();

Returns

Colormap - Shared 256-texel, linearly filtered map for CPU or GPU sampling. Equivalent to WasmGPU.color.map.builtin("grayscale").

See Also