Luminance.RelativeLuminance

Extension Method in Luminance

Declaration

public static float RelativeLuminance(this Color color, SignalEncoding encoding = SignalEncoding.Rec709)

Description

Calculates the relative luminance of the color, measured according to the HSL color model.

Parameters

colorThe color to calculate the luminance of.
encodingThe encoding to use when calculating the luminance (default=Rec709).

Returns

floatThe relative luminance of the color.