C# Class JP.Utils.UI.ColorConverter

显示文件 Open project: JuniperPhoton/JP.Utils.UWP

Public Methods

Method Description
GetLumaFromColor ( Color color ) : double
Hex2Color ( string hexColor ) : Color?

将16进制的颜色标识转换为ARGB 表示的Color 格式为:#FFF75B44

IsLight ( Color color ) : bool
RGB2Hex ( int r, int g, int b ) : string

Private Methods

Method Description
GetIntFromHex ( string strHex ) : int

Method Details

GetLumaFromColor() public static method

public static GetLumaFromColor ( Color color ) : double
color Color
return double

Hex2Color() public static method

将16进制的颜色标识转换为ARGB 表示的Color 格式为:#FFF75B44
public static Hex2Color ( string hexColor ) : Color?
hexColor string
return Color?

IsLight() public static method

public static IsLight ( Color color ) : bool
color Color
return bool

RGB2Hex() public static method

public static RGB2Hex ( int r, int g, int b ) : string
r int
g int
b int
return string