ImageThemingUtilities.IsLight(Color) 方法

定义

指示给定颜色是否为 "浅色",或更具体地说,指示其发光度是否大于或等于0.5。

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsLight(System::Windows::Media::Color color);
public static bool IsLight (this System.Windows.Media.Color color);
static member IsLight : System.Windows.Media.Color -> bool
<Extension()>
Public Function IsLight (color As Color) As Boolean

参数

color
Color

要测试的颜色

返回

Boolean

如果颜色为浅色,则为 True; 如果颜色为黑色,则为 false。

适用于