colormap#getLUT¶
Summary¶
colormap#getLUT returns a copy of the map's lookup table in packed RGBA8 order. By default the RGB bytes are sRGB. Request linear RGB when decoding the individual texels for numeric use.
Syntax¶
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
colorSpace |
"srgb" | "linear" |
No | Defaults to "srgb". Linear output decodes the RGB channels and rounds them to bytes. Alpha bytes stay the same. |
Returns¶
Uint8Array - Independent copy of width * 4 bytes. For GPU-only maps, the call throws.