Skip to content

oklabPalette

oklabPalette(pixels, options?): OklabPalette

Defined in: packages/math-color/src/oklab-palette.ts:112

Generates a palette of dominant colors from an array of OKLab pixels using K-means clustering and hierarchical clustering.

Oklab[]

An iterable of OKLab pixels to analyze.

OklabPaletteOptions

Optional parameters for palette generation.

OklabPalette

An array of OklabPaletteColor objects representing the dominant colors and their weights.