C# Class Sunny.UI.RandomColor

Generates random numbers.
Afficher le fichier Open project: yhuse/SunnyUI

Méthodes publiques

Méthode Description
GetColor ( ColorScheme scheme, Luminosity luminosity ) : Color

Gets a new random color.

GetColors ( ) : Color[]

Generate one color for each of the provided generator options.

GetColors ( ColorScheme scheme, Luminosity luminosity, int count ) : Color[]

Generates multiple random colors.

HsvToColor ( int hue, int saturation, double value ) : Color

Converts hue, saturation, and lightness to a color.

Seed ( ) : void

Reseeds the random number generated.

Seed ( int seed ) : void

Reseeds the random number generated.

Private Methods

Méthode Description
DefineColor ( ColorScheme scheme, Array hueRange, ].int[ lowerBounds ) : void
GetColorInfo ( int hue ) : DefinedColor
GetHueRange ( ColorScheme colorInput ) : Range
GetMinimumBrightness ( int H, int S ) : int
LoadColorBounds ( ) : void
PickBrightness ( int H, int S, Luminosity luminosity ) : int
PickHue ( ColorScheme scheme ) : int
PickSaturation ( int hue, Luminosity luminosity, ColorScheme scheme ) : int
RandomColor ( ) : System
RandomWithin ( Range range ) : int
RandomWithin ( int lower, int upper ) : int

Method Details

GetColor() public static méthode

Gets a new random color.
public static GetColor ( ColorScheme scheme, Luminosity luminosity ) : Color
scheme ColorScheme Which color schemed to use when generating the color.
luminosity Luminosity The desired luminosity of the color.
Résultat Color

GetColors() public static méthode

Generate one color for each of the provided generator options.
public static GetColors ( ) : Color[]
Résultat Color[]

GetColors() public static méthode

Generates multiple random colors.
public static GetColors ( ColorScheme scheme, Luminosity luminosity, int count ) : Color[]
scheme ColorScheme Which color schemed to use when generating the color.
luminosity Luminosity The desired luminosity of the color.
count int How many colors to generate
Résultat Color[]

HsvToColor() public static méthode

Converts hue, saturation, and lightness to a color.
public static HsvToColor ( int hue, int saturation, double value ) : Color
hue int
saturation int
value double
Résultat Color

Seed() public static méthode

Reseeds the random number generated.
public static Seed ( ) : void
Résultat void

Seed() public static méthode

Reseeds the random number generated.
public static Seed ( int seed ) : void
seed int The number used to reseed the random number generator.
Résultat void