C# Class emanual.Wpf.Controls.ColorUtility

显示文件 Open project: kienaiProject/ArtOfWords

Public Methods

Method Description
ClampColorValue ( double colorValue, double min, double max ) : double
ClampColorValue ( int colorValue, int min, int max ) : int
ColorToHsv ( Color color, double &h, double &s, double &v ) : void
ConvertColorFromString ( string s ) : Color
GetInvertTextColor ( Color backgroundColor ) : Color
HslToRgb ( double hue, double saturation, double lightness ) : Color
HsvToColor ( double h, double s, double v ) : Color
HsvToRgb ( double h, double s, double v, double &r, double &g, double &b ) : void
RgbToHsl ( System color, double &hue, double &saturation, double &lightness ) : void
RgbToHsv ( double r, double g, double b, double &h, double &s, double &v ) : void

Method Details

ClampColorValue() public static method

public static ClampColorValue ( double colorValue, double min, double max ) : double
colorValue double
min double
max double
return double

ClampColorValue() public static method

public static ClampColorValue ( int colorValue, int min, int max ) : int
colorValue int
min int
max int
return int

ColorToHsv() public static method

public static ColorToHsv ( Color color, double &h, double &s, double &v ) : void
color Color
h double
s double
v double
return void

ConvertColorFromString() public static method

public static ConvertColorFromString ( string s ) : Color
s string
return Color

GetInvertTextColor() public static method

public static GetInvertTextColor ( Color backgroundColor ) : Color
backgroundColor Color
return Color

HslToRgb() public static method

public static HslToRgb ( double hue, double saturation, double lightness ) : Color
hue double
saturation double
lightness double
return System.Windows.Media.Color

HsvToColor() public static method

public static HsvToColor ( double h, double s, double v ) : Color
h double
s double
v double
return Color

HsvToRgb() public static method

public static HsvToRgb ( double h, double s, double v, double &r, double &g, double &b ) : void
h double
s double
v double
r double
g double
b double
return void

RgbToHsl() public static method

public static RgbToHsl ( System color, double &hue, double &saturation, double &lightness ) : void
color System
hue double
saturation double
lightness double
return void

RgbToHsv() public static method

public static RgbToHsv ( double r, double g, double b, double &h, double &s, double &v ) : void
r double
g double
b double
h double
s double
v double
return void