C# Class entity.MetaEditor2.ColorHandler

The color handler.
显示文件 Open project: troymac1ure/Entity Class Usage Examples

Public Methods

Method Description
HSVtoColor ( HSV hsv ) : Color

The hs vto color.

HSVtoColor ( int H, int S, int V ) : Color

The hs vto color.

HSVtoRGB ( HSV HSV ) : RGB

The hs vto rgb.

HSV contains values scaled as in the color wheel: that is, all from 0 to 255. for ( this code to work, HSV.Hue needs to be scaled from 0 to 360 (it//s the angle of the selected point within the circle). HSV.Saturation and HSV.value must be scaled to be between 0 and 1.

HSVtoRGB ( int H, int S, int V ) : RGB

The hs vto rgb.

RGBtoHSV ( RGB RGB ) : HSV

In this function, R, G, and B values must be scaled to be between 0 and 1. HSV.Hue will be a value between 0 and 360, and HSV.Saturation and value are between 0 and 1. The code must scale these to be between 0 and 255 for the purposes of this application.

Method Details

HSVtoColor() public static method

The hs vto color.
public static HSVtoColor ( HSV hsv ) : Color
hsv HSV The hsv.
return Color

HSVtoColor() public static method

The hs vto color.
public static HSVtoColor ( int H, int S, int V ) : Color
H int The h.
S int The s.
V int The v.
return Color

HSVtoRGB() public static method

The hs vto rgb.
HSV contains values scaled as in the color wheel: that is, all from 0 to 255. for ( this code to work, HSV.Hue needs to be scaled from 0 to 360 (it//s the angle of the selected point within the circle). HSV.Saturation and HSV.value must be scaled to be between 0 and 1.
public static HSVtoRGB ( HSV HSV ) : RGB
HSV HSV The hsv.
return RGB

HSVtoRGB() public static method

The hs vto rgb.
public static HSVtoRGB ( int H, int S, int V ) : RGB
H int The h.
S int The s.
V int The v.
return RGB

RGBtoHSV() public static method

In this function, R, G, and B values must be scaled to be between 0 and 1. HSV.Hue will be a value between 0 and 360, and HSV.Saturation and value are between 0 and 1. The code must scale these to be between 0 and 255 for the purposes of this application.
public static RGBtoHSV ( RGB RGB ) : HSV
RGB RGB The R(ed)G(reen)B(lue) values
return HSV