Skip to content

oklabToneAnalysis

oklabToneAnalysis(pixels, options?): OklabToneAnalysis

Defined in: packages/math-color/src/oklab-tone-analysis.ts:139

Analyses the tonal and chromatic properties of an image from its pixel data.

Converts each pixel above the alpha threshold to OKLab and accumulates statistics covering saturation, lightness, colour temperature, and tonal range.

Iterable<Oklab>

The raw pixel data to analyse (RGBA, 8 bits per channel).

OklabToneAnalysisOptions

Optional overrides for analysis thresholds.

OklabToneAnalysis

Tonal and chromatic statistics for the image.