C# Class HermitDaveControls.ColorSpace

Show file Open project: hermitdave/HermitDaveWinRTControls

Public Methods

Method Description
ConvertHsvToRgb ( float hue, float saturation, float value ) : Color
ConvertRgbToHsv ( Color c ) : HSV

Converts from the Red/Green/Blue color space to the Hue/Sat/Val (HSV) color space. Algorithm ported from: http://www.codeproject.com/KB/recipes/colorspace1.aspx

GetBlackAndWhiteGradientBrush ( Orientation orientation ) : LinearGradientBrush
GetColorFromHueValue ( float position ) : Color
GetColorGradientBrush ( Orientation orientation ) : LinearGradientBrush
GetHexCode ( Color c ) : string

Private Methods

Method Description
CreateGradientBrush ( Orientation orientation ) : LinearGradientBrush

Method Details

ConvertHsvToRgb() public static method

public static ConvertHsvToRgb ( float hue, float saturation, float value ) : Color
hue float
saturation float
value float
return Color

ConvertRgbToHsv() public static method

Converts from the Red/Green/Blue color space to the Hue/Sat/Val (HSV) color space. Algorithm ported from: http://www.codeproject.com/KB/recipes/colorspace1.aspx
public static ConvertRgbToHsv ( Color c ) : HSV
c Color The color to convert.
return HSV

GetBlackAndWhiteGradientBrush() public static method

public static GetBlackAndWhiteGradientBrush ( Orientation orientation ) : LinearGradientBrush
orientation Orientation
return Windows.UI.Xaml.Media.LinearGradientBrush

GetColorFromHueValue() public static method

public static GetColorFromHueValue ( float position ) : Color
position float
return Color

GetColorGradientBrush() public static method

public static GetColorGradientBrush ( Orientation orientation ) : LinearGradientBrush
orientation Orientation
return Windows.UI.Xaml.Media.LinearGradientBrush

GetHexCode() public static method

public static GetHexCode ( Color c ) : string
c Color
return string