Color Structure
![]() |
---|
The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience. |
Describes a color in terms of alpha, red, green, and blue channels.
Assembly: PresentationCore (in PresentationCore.dll)
Name | Description | |
---|---|---|
![]() | A | Gets or sets the sRGB alpha channel value of the color. |
![]() | B | Gets or sets the sRGB blue channel value of the color. |
![]() | ColorContext | Gets the International Color Consortium (ICC) or Image Color Management (ICM) color profile of the color. |
![]() | G | Gets or sets the sRGB green channel value of the color. |
![]() | R | Gets or sets the sRGB red channel value of the color. |
![]() | ScA | Gets or sets the ScRGB alpha channel value of the color. |
![]() | ScB | Gets or sets the ScRGB blue channel value of the color. |
![]() | ScG | Gets or sets the ScRGB green channel value of the color. |
![]() | ScR | Gets or sets the ScRGB red channel value of the color. |
Name | Description | |
---|---|---|
![]() ![]() | Add(Color, Color) | Adds two Color structures. |
![]() ![]() | AreClose(Color, Color) | Compares two Color structures for fuzzy equality. |
![]() | Clamp() | Sets the ScRGB channels of the color to within the gamut of 0 to 1, if they are outside that range. |
![]() | Equals(Color) | Tests whether the specified Color structure is identical to this color. |
![]() ![]() | Equals(Color, Color) | Tests whether two Color structures are identical. |
![]() | Equals(Object) | Tests whether the specified object is a Color structure and is equivalent to this color. (Overrides ValueType.Equals(Object).) |
![]() ![]() | FromArgb(Byte, Byte, Byte, Byte) | Creates a new Color structure by using the specified sRGB alpha channel and color channel values. |
![]() ![]() | FromAValues(Single, Single[], Uri) | Creates a new Color structure by using the specified alpha channel, color channel values, and color profile. |
![]() ![]() | FromRgb(Byte, Byte, Byte) | Creates a new Color structure by using the specified sRGB color channel values. |
![]() ![]() | FromScRgb(Single, Single, Single, Single) | Creates a new Color structure by using the specified ScRGB alpha channel and color channel values. |
![]() ![]() | FromValues(Single[], Uri) | Creates a new Color structure by using the specified color channel values and color profile. |
![]() | GetHashCode() | Gets a hash code for this Color structure. (Overrides ValueType.GetHashCode().) |
![]() | GetNativeColorValues() | Gets the color channel values of the color. |
![]() | GetType() | |
![]() ![]() | Multiply(Color, Single) | Multiplies the alpha, red, blue, and green channels of the specified Color structure by the specified value. |
![]() ![]() | Subtract(Color, Color) | Subtracts a Color structure from a Color structure. |
![]() | ToString() | Creates a string representation of the color using the sRGB channels. (Overrides ValueType.ToString().) |
![]() | ToString(IFormatProvider) | Creates a string representation of the color by using the sRGB channels and the specified format provider. |
Name | Description | |
---|---|---|
![]() ![]() | Addition(Color, Color) | Adds two Color structures. |
![]() ![]() | Equality(Color, Color) | Tests whether two Color structures are identical. |
![]() ![]() | Inequality(Color, Color) | Tests whether two Color structures are not identical. |
![]() ![]() | Multiply(Color, Single) | Multiplies the alpha, red, blue, and green channels of the specified Color structure by the specified value. |
![]() ![]() | Subtraction(Color, Color) | Subtracts a Color structure from a Color structure. |
Name | Description | |
---|---|---|
![]() ![]() | IFormattable.ToString(String, IFormatProvider) | Formats the value of the current instance using the specified format. |
<object property="predefinedColor"/> - or - <object property="#rgb"/> - or - <object property="#argb"/> - or - <object property="#rrggbb"/> - or - <object property="#aarrggbb"/> - or - <object property="sc# scA,scR,scG,scB"/> - or - <object property="ContextColor profileUri alphaValue,colorValue"/>
- predefinedColor
One of the colors predefined by the Colors class.
- rgb
A three-digit hexadecimal number. The first digit specifies the color's R value, the second digit specifies the G value, and the third digit specifies the B value. For example, 00F.
- argb
A four-digit hexadecimal number. The first digit specifies the color's A value, the second digit specifies its R value, the next digit specifies the G value, and the final digit specifies its B value. For example, F00F.
- rrggbb
A six-digit hexadecimal number. The first two digits specify the color's R value, the next two specify its G value, and the final two specify its B value. For example, 0000FF.
- aarrggbb
An eight-digit hexadecimal number. The first two digits specify the color's A value, the next two specify its R value, the next two specify its G value, and the final two specify its B value. For example, FF0000FF.
- scA
The color's ScA value.
- scR
The color's ScR value.
- scG
The color's ScG value.
- scB
The color's ScB value.
- profileUri
The International Color Consortium (ICC) or Image Color Management (ICM) color profile.
- alphaValue
The alpha channel color value. The value range is 0.0 to 1.0.
- colorValue
A comma-delimited list of three to eight values that represent the color channels of the color profile. The value range is 0.0 to 1.0.
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.