C# Класс Microsoft.Xna.Framework.ColorExtensions

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
ColorMappings Color>.Dictionary

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

Метод Описание
BlueOnly ( this color ) : Color

Returns a new Color using only the Blue value of this color.

FromParser ( this color, string value, bool &keepR, bool &keepG, bool &keepB, bool &keepA, bool &useDefault ) : Color

Gets a color in the format of SadConsole.ParseCommandRecolor.

GetBrightness ( this color ) : float
GetHue ( this color ) : float
GetLuma ( this color ) : float
GetRandomColor ( this color, Random random ) : Color
GetSaturation ( this color ) : float
GreenOnly ( this color ) : Color

Returns a new Color using only the Green value of this color.

LerpSteps ( this color, Color endingColor, int steps ) : Color[]
RedOnly ( this color ) : Color

Returns a new Color using only the Red value of this color.

SetHSL ( this color, float h, float s, float l ) : void
ToInteger ( this color ) : uint
ToParser ( this color ) : string

Converts a color to the format used by SadConsole.ParseCommandRecolor command.

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

Метод Описание
Hue_2_RGB ( float v1, float v2, float vH ) : float

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

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

Returns a new Color using only the Blue value of this color.
public static BlueOnly ( this color ) : Color
color this Object instance.
Результат Color

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

Gets a color in the format of SadConsole.ParseCommandRecolor.
public static FromParser ( this color, string value, bool &keepR, bool &keepG, bool &keepB, bool &keepA, bool &useDefault ) : Color
color this
value string
keepR bool
keepG bool
keepB bool
keepA bool
useDefault bool
Результат Color

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

public static GetBrightness ( this color ) : float
color this
Результат float

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

public static GetHue ( this color ) : float
color this
Результат float

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

public static GetLuma ( this color ) : float
color this
Результат float

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

public static GetRandomColor ( this color, Random random ) : Color
color this
random System.Random
Результат Color

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

public static GetSaturation ( this color ) : float
color this
Результат float

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

Returns a new Color using only the Green value of this color.
public static GreenOnly ( this color ) : Color
color this Object instance.
Результат Color

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

public static LerpSteps ( this color, Color endingColor, int steps ) : Color[]
color this
endingColor Color
steps int
Результат Color[]

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

Returns a new Color using only the Red value of this color.
public static RedOnly ( this color ) : Color
color this Object instance.
Результат Color

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

public static SetHSL ( this color, float h, float s, float l ) : void
color this
h float
s float
l float
Результат void

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

public static ToInteger ( this color ) : uint
color this
Результат uint

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

Converts a color to the format used by SadConsole.ParseCommandRecolor command.
public static ToParser ( this color ) : string
color this The color to convert.
Результат string

Описание свойств

ColorMappings публичное статическое свойство

Custom color mappings for the FromParser(Color, string, out bool, out bool, out bool, out bool, out bool) method.
public static Dictionary ColorMappings
Результат Color>.Dictionary