color.palette.tab10¶
Summary¶
color.palette.tab10 supplies ten categorical swatches for series or integer labels. Sample at texel centers for indexed shader lookup, or use color.palette.swatch("tab10", index) to assign one color in JavaScript.
Syntax¶
Returns¶
Colormap - Shared nearest-filtered map with ten texels in palette order. Equivalent to WasmGPU.color.palette.builtin("tab10").
Example¶
import WasmGPU from "@zushah/wasmgpu";
const palette = WasmGPU.color.palette.tab10();
const blue = palette.sampleCPU(0.5 / palette.width);
const orange = WasmGPU.color.palette.swatch("tab10", 1);