C# Класс Sunny.UI.RandomColor

Generates random numbers.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

GetColor() публичный статический Метод

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.
Результат Color

GetColors() публичный статический Метод

Generate one color for each of the provided generator options.
public static GetColors ( ) : Color[]
Результат Color[]

GetColors() публичный статический Метод

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
Результат Color[]

HsvToColor() публичный статический Метод

Converts hue, saturation, and lightness to a color.
public static HsvToColor ( int hue, int saturation, double value ) : Color
hue int
saturation int
value double
Результат Color

Seed() публичный статический Метод

Reseeds the random number generated.
public static Seed ( ) : void
Результат void

Seed() публичный статический Метод

Reseeds the random number generated.
public static Seed ( int seed ) : void
seed int The number used to reseed the random number generator.
Результат void