Color
Describes a color in terms of alpha, red, green, and blue channels.
Definition
Namespace:Telerik.WinControls.SyntaxEditor.UI
Assembly:Telerik.WinControls.SyntaxEditor.dll
Syntax:
[TypeConverter(typeof(WpfColorConverter))]
public struct Color : IFormattable
Implements:
Properties
Gets or sets the sRGB alpha channel value of the color.
public byte A { get; set; }
The sRGB alpha channel value of the color.
Gets or sets the sRGB blue channel value of the color.
public byte B { get; set; }
The sRGB blue channel value of the current Color structure.
Gets or sets the sRGB green channel value of the color.
public byte G { get; set; }
The sRGB green channel value of the current Color structure.
Gets or sets the sRGB red channel value of the color.
public byte R { get; set; }
The sRGB red channel value of the current Color structure.
Gets or sets the ScRGB alpha channel value of the color.
public float ScA { get; set; }
The ScRGB alpha channel value of the current Color structure.
Gets or sets the ScRGB blue channel value of the color.
public float ScB { get; set; }
The ScRGB red channel value of the current Color structure.
Gets or sets the ScRGB green channel value of the color.
public float ScG { get; set; }
The ScRGB green channel value of the current Color structure.
Methods
Sets the ScRGB channels of the color to within the gamut of 0 to 1, if they are outside that range.
public void Clamp()
Tests whether the specified Color structure is identical to the current color.
Tests whether the specified object is a Color structure and is equivalent to the current color.
Creates a new Color structure by using the specified sRGB alpha channel and color channel values.
public static Color FromArgb(byte a, byte r, byte g, byte b)
The alpha channel, A, of the new color.
rbyteThe red channel, R, of the new color.
gbyteThe green channel, G, of the new color.
bbyteThe blue channel, B, of the new color.
Returns:A Color structure with the specified values.
Creates a new Color structure by using the specified alpha channel, color channel values, and color profile.
public static Color FromAValues(float a, float[] values, Uri profileUri)
The alpha channel for the new color.
valuesfloat[]A collection of values that specify the color channels for the new color. These values map to the profileUri.
The International Color Consortium (ICC) or Image Color Management (ICM) color profile for the new color.
Returns:A Color structure with the specified values.
Creates a new Color structure by using the specified sRGB color channel values.
Creates a new Color structure by using the specified ScRGB alpha channel and color channel values.
public static Color FromScRgb(float a, float r, float g, float b)
The ScRGB alpha channel, ScA, of the new color.
rfloatThe ScRGB red channel, ScR, of the new color.
gfloatThe ScRGB green channel, ScG, of the new color.
bfloatThe ScRGB blue channel, ScB, of the new color.
Returns:A Color structure with the specified values.
Creates a new Color structure by using the specified color channel values and color profile.
public static Color FromValues(float[] values, Uri profileUri)
A collection of values that specify the color channels for the new color. These values map to the profileUri.
The International Color Consortium (ICC) or Image Color Management (ICM) color profile for the new color.
Returns:A Color structure with the specified values and an alpha channel value of 1.
Gets the color channel values of the color.
Multiplies the alpha, red, blue, and green channels of the specified Color structure by the specified value.
Creates a string representation of the color using the ScRGB channels.
public override string ToString()
The string representation of the color.
Overrides:
Creates a string representation of the color by using the ScRGB channels and the specified format provider.
public string ToString(IFormatProvider provider)
Culture-specific formatting information.
Returns:The string representation of the color.
Operators
Multiplies the alpha, red, blue, and green channels of the specified Color structure by the specified value.