ColorUtilities.GetLuminance(Color) Method

Definition

Gets the luminance of a color in sRGB colorspace according to https://www.w3.org/TR/WCAG20/#relativeluminancedef

public static double GetLuminance (this System.Windows.Media.Color color);
static member GetLuminance : System.Windows.Media.Color -> double
<Extension()>
Public Function GetLuminance (color As Color) As Double

Parameters

color
Color

The color whose luminance is to be computed.

Returns

The luminance value of color.

Applies to