labWeightedMean
Defined in: packages/math-color/src/models/lab-weighted-mean.ts:22
Computes the coverage-weighted mean of an array of Lab colors.
Each entry contributes its color proportionally to its weight. The result is the weighted centroid of the input colors in Lab space.
Type Parameters
Section titled “Type Parameters”S extends string
Parameters
Section titled “Parameters”entries
Section titled “entries”LabWeighted<S>[]
Array of Lab colors with associated weights (e.g. coverage fractions).
Returns
Section titled “Returns”The weighted mean Lab color. Returns NaN components if the total weight is zero.