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.
Parameters
Section titled “Parameters”pixels
Section titled “pixels”Iterable<Oklab>
The raw pixel data to analyse (RGBA, 8 bits per channel).
options?
Section titled “options?”Optional overrides for analysis thresholds.
Returns
Section titled “Returns”Tonal and chromatic statistics for the image.