C# Class Smrf.GraphicsLib.ColorUtil

Utility methods for working with colors.
This class adds functionality to the System.Drawing.Color class. A better design would have a new ColorPlus class inherit from Color, with new methods added to ColorPlus, but because the Color class is sealed, that isn't possible.

All methods are static.

Mostrar archivo Open project: 2014-sed-team3/term-project

Public Properties

Property Type Description
UniqueColorHues System.Int32

Public Methods

Method Description
GetUniqueColor ( Int32 index, Int32 totalUniqueColors ) : Color
ToHtmlString ( Color color ) : String
TryConvertFromInvariantString ( String theString, System.Drawing.ColorConverter colorConverter, Color &color ) : System.Boolean

Private Methods

Method Description
ColorHLSToRGB ( Int32 wHue, Int32 wLuminance, Int32 wSaturation ) : Int32

Method Details

GetUniqueColor() public static method

public static GetUniqueColor ( Int32 index, Int32 totalUniqueColors ) : Color
index System.Int32
totalUniqueColors System.Int32
return Color

ToHtmlString() public static method

public static ToHtmlString ( Color color ) : String
color Color
return String

TryConvertFromInvariantString() public static method

public static TryConvertFromInvariantString ( String theString, System.Drawing.ColorConverter colorConverter, Color &color ) : System.Boolean
theString String
colorConverter System.Drawing.ColorConverter
color Color
return System.Boolean

Property Details

UniqueColorHues public_oe static_oe property

Number of unique hues used by GetUniqueColor.
public static Int32,System UniqueColorHues
return System.Int32