ImageThemingUtilities.IsDark(Color) 方法

定义

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

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

参数

color
Color

要测试的颜色

返回

Boolean

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

适用于