Skip to main content

@microsoft/fast-colors > matchLightnessIndex

matchLightnessIndex() function

Takes the input color and compares it to each color in the reference array to find the index with the closest Lightness value in HSL color space

Signature:
export declare function matchLightnessIndex(input: ColorRGBA64, reference: ColorRGBA64[]): number;

Parameters

ParameterTypeDescription
inputColorRGBA64
referenceColorRGBA64[]
Returns:

number