Luminance.PerceivedBrightness

Extension Method in Luminance

Declaration

public static float PerceivedBrightness(this Color color, SignalEncoding encoding = SignalEncoding.Rec601)

Description

Calculates the perceived brightness of the color, measured according to the HSP color model - http://alienryderflex.com/hsp.html.

Parameters

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

Returns

floatThe perceived brightness of the color.