Colors Class
Implements a set of predefined colors.
Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
The Colors type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | AliceBlue | Gets the system-defined color that has an ARGB value of #FFF0F8FF. |
![]() ![]() | AntiqueWhite | Gets the system-defined color that has an ARGB value of #FFFAEBD7. |
![]() ![]() | Aqua | Gets the system-defined color that has an ARGB value of #FF00FFFF. |
![]() ![]() | Aquamarine | Gets the system-defined color that has an ARGB value of #FF7FFFD4. |
![]() ![]() | Azure | Gets the system-defined color that has an ARGB value of #FFF0FFFF. |
![]() ![]() | Beige | Gets the system-defined color that has an ARGB value of #FFF5F5DC. |
![]() ![]() | Bisque | Gets the system-defined color that has an ARGB value of #FFFFE4C4. |
![]() ![]() | Black | Gets the system-defined color that has an ARGB value of #FF000000. |
![]() ![]() | BlanchedAlmond | Gets the system-defined color that has an ARGB value of #FFFFEBCD. |
![]() ![]() | Blue | Gets the system-defined color that has an ARGB value of #FF0000FF. |
![]() ![]() | BlueViolet | Gets the system-defined color that has an ARGB value of #FF8A2BE2. |
![]() ![]() | Brown | Gets the system-defined color that has an ARGB value of #FFA52A2A. |
![]() ![]() | BurlyWood | Gets the system-defined color that has an ARGB value of #FFDEB887. |
![]() ![]() | CadetBlue | Gets the system-defined color that has an ARGB value of #FF5F9EA0. |
![]() ![]() | Chartreuse | Gets the system-defined color that has an ARGB value of #FF7FFF00. |
![]() ![]() | Chocolate | Gets the system-defined color that has an ARGB value of #FFD2691E. |
![]() ![]() | Coral | Gets the system-defined color that has an ARGB value of #FFFF7F50. |
![]() ![]() | CornflowerBlue | Gets the system-defined color that has an ARGB value of #FF6495ED. |
![]() ![]() | Cornsilk | Gets the system-defined color that has an ARGB value of #FFFFF8DC. |
![]() ![]() | Crimson | Gets the system-defined color that has an ARGB value of #FFDC143C. |
![]() ![]() | Cyan | Gets the system-defined color that has an ARGB value of #FF00FFFF. |
![]() ![]() | DarkBlue | Gets the system-defined color that has an ARGB value of #FF00008B. |
![]() ![]() | DarkCyan | Gets the system-defined color that has an ARGB value of #FF008B8B. |
![]() ![]() | DarkGoldenrod | Gets the system-defined color that has an ARGB value of #FFB8860B. |
![]() ![]() | DarkGray | Gets the system-defined color that has an ARGB value of #FFA9A9A9. |
![]() ![]() | DarkGreen | Gets the system-defined color that has an ARGB value of #FF006400. |
![]() ![]() | DarkKhaki | Gets the system-defined color that has an ARGB value of #FFBDB76B. |
![]() ![]() | DarkMagenta | Gets the system-defined color that has an ARGB value of #FF8B008B. |
![]() ![]() | DarkOliveGreen | Gets the system-defined color that has an ARGB value of #FF556B2F. |
![]() ![]() | DarkOrange | Gets the system-defined color that has an ARGB value of #FFFF8C00. |
![]() ![]() | DarkOrchid | Gets the system-defined color that has an ARGB value of #FF9932CC. |
![]() ![]() | DarkRed | Gets the system-defined color that has an ARGB value of #FF8B0000. |
![]() ![]() | DarkSalmon | Gets the system-defined color that has an ARGB value of #FFE9967A. |
![]() ![]() | DarkSeaGreen | Gets the system-defined color that has an ARGB value of #FF8FBC8F. |
![]() ![]() | DarkSlateBlue | Gets the system-defined color that has an ARGB value of #FF483D8B. |
![]() ![]() | DarkSlateGray | Gets the system-defined color that has an ARGB value of #FF2F4F4F. |
![]() ![]() | DarkTurquoise | Gets the system-defined color that has an ARGB value of #FF00CED1. |
![]() ![]() | DarkViolet | Gets the system-defined color that has an ARGB value of #FF9400D3. |
![]() ![]() | DeepPink | Gets the system-defined color that has an ARGB value of #FFFF1493. |
![]() ![]() | DeepSkyBlue | Gets the system-defined color that has an ARGB value of #FF00BFFF. |
![]() ![]() | DimGray | Gets the system-defined color that has an ARGB value of #FF696969. |
![]() ![]() | DodgerBlue | Gets the system-defined color that has an ARGB value of #FF1E90FF. |
![]() ![]() | Firebrick | Gets the system-defined color that has an ARGB value of #FFB22222. |
![]() ![]() | FloralWhite | Gets the system-defined color that has an ARGB value of #FFFFFAF0. |
![]() ![]() | ForestGreen | Gets the system-defined color that has an ARGB value of #FF228B22. |
![]() ![]() | Fuchsia | Gets the system-defined color that has an ARGB value of #FFFF00FF. |
![]() ![]() | Gainsboro | Gets the system-defined color that has an ARGB value of #FFDCDCDC. |
![]() ![]() | GhostWhite | Gets the system-defined color that has an ARGB value of #FFF8F8FF. |
![]() ![]() | Gold | Gets the system-defined color that has an ARGB value of #FFFFD700. |
![]() ![]() | Goldenrod | Gets the system-defined color that has an ARGB value of #FFDAA520. |
![]() ![]() | Gray | Gets the system-defined color that has an ARGB value of #FF808080. |
![]() ![]() | Green | Gets the system-defined color that has an ARGB value of #FF008000. |
![]() ![]() | GreenYellow | Gets the system-defined color that has an ARGB value of #FFADFF2F. |
![]() ![]() | Honeydew | Gets the system-defined color that has an ARGB value of #FFF0FFF0. |
![]() ![]() | HotPink | Gets the system-defined color that has an ARGB value of #FFFF69B4. |
![]() ![]() | IndianRed | Gets the system-defined color that has an ARGB value of #FFCD5C5C. |
![]() ![]() | Indigo | Gets the system-defined color that has an ARGB value of #FF4B0082. |
![]() ![]() | Ivory | Gets the system-defined color that has an ARGB value of #FFFFFFF0. |
![]() ![]() | Khaki | Gets the system-defined color that has an ARGB value of #FFF0E68C. |
![]() ![]() | Lavender | Gets the system-defined color that has an ARGB value of #FFE6E6FA. |
![]() ![]() | LavenderBlush | Gets the system-defined color that has an ARGB value of #FFFFF0F5. |
![]() ![]() | LawnGreen | Gets the system-defined color that has an ARGB value of #FF7CFC00. |
![]() ![]() | LemonChiffon | Gets the system-defined color that has an ARGB value of #FFFFFACD. |
![]() ![]() | LightBlue | Gets the system-defined color that has an ARGB value of #FFADD8E6. |
![]() ![]() | LightCoral | Gets the system-defined color that has an ARGB value of #FFF08080. |
![]() ![]() | LightCyan | Gets the system-defined color that has an ARGB value of #FFE0FFFF. |
![]() ![]() | LightGoldenrodYellow | Gets the system-defined color that has an ARGB value of #FFFAFAD2. |
![]() ![]() | LightGray | Gets the system-defined color that has an ARGB value of #FFD3D3D3. |
![]() ![]() | LightGreen | Gets the system-defined color that has an ARGB value of #FF90EE90. |
![]() ![]() | LightPink | Gets the system-defined color that has an ARGB value of #FFFFB6C1. |
![]() ![]() | LightSalmon | Gets the system-defined color that has an ARGB value of #FFFFA07A. |
![]() ![]() | LightSeaGreen | Gets the system-defined color that has an ARGB value of #FF20B2AA. |
![]() ![]() | LightSkyBlue | Gets the system-defined color that has an ARGB value of #FF87CEFA. |
![]() ![]() | LightSlateGray | Gets the system-defined color that has an ARGB value of #FF778899. |
![]() ![]() | LightSteelBlue | Gets the system-defined color that has an ARGB value of #FFB0C4DE. |
![]() ![]() | LightYellow | Gets the system-defined color that has an ARGB value of #FFFFFFE0. |
![]() ![]() | Lime | Gets the system-defined color that has an ARGB value of #FF00FF00. |
![]() ![]() | LimeGreen | Gets the system-defined color that has an ARGB value of #FF32CD32. |
![]() ![]() | Linen | Gets the system-defined color that has an ARGB value of #FFFAF0E6. |
![]() ![]() | Magenta | Gets the system-defined color that has an ARGB value of #FFFF00FF. |
![]() ![]() | Maroon | Gets the system-defined color that has an ARGB value of #FF800000. |
![]() ![]() | MediumAquamarine | Gets the system-defined color that has an ARGB value of #FF66CDAA. |
![]() ![]() | MediumBlue | Gets the system-defined color that has an ARGB value of #FF0000CD. |
![]() ![]() | MediumOrchid | Gets the system-defined color that has an ARGB value of #FFBA55D3. |
![]() ![]() | MediumPurple | Gets the system-defined color that has an ARGB value of #FF9370DB. |
![]() ![]() | MediumSeaGreen | Gets the system-defined color that has an ARGB value of #FF3CB371. |
![]() ![]() | MediumSlateBlue | Gets the system-defined color that has an ARGB value of #FF7B68EE. |
![]() ![]() | MediumSpringGreen | Gets the system-defined color that has an ARGB value of #FF00FA9A. |
![]() ![]() | MediumTurquoise | Gets the system-defined color that has an ARGB value of #FF48D1CC. |
![]() ![]() | MediumVioletRed | Gets the system-defined color that has an ARGB value of #FFC71585. |
![]() ![]() | MidnightBlue | Gets the system-defined color that has an ARGB value of #FF191970. |
![]() ![]() | MintCream | Gets the system-defined color that has an ARGB value of #FFF5FFFA. |
![]() ![]() | MistyRose | Gets the system-defined color that has an ARGB value of #FFFFE4E1. |
![]() ![]() | Moccasin | Gets the system-defined color that has an ARGB value of #FFFFE4B5. |
![]() ![]() | NavajoWhite | Gets the system-defined color that has an ARGB value of #FFFFDEAD. |
![]() ![]() | Navy | Gets the system-defined color that has an ARGB value of #FF000080. |
![]() ![]() | OldLace | Gets the system-defined color that has an ARGB value of #FFFDF5E6. |
![]() ![]() | Olive | Gets the system-defined color that has an ARGB value of #FF808000. |
![]() ![]() | OliveDrab | Gets the system-defined color that has an ARGB value of #FF6B8E23. |
![]() ![]() | Orange | Gets the system-defined color that has an ARGB value of #FFFFA500. |
![]() ![]() | OrangeRed | Gets the system-defined color that has an ARGB value of #FFFF4500. |
![]() ![]() | Orchid | Gets the system-defined color that has an ARGB value of #FFDA70D6. |
![]() ![]() | PaleGoldenrod | Gets the system-defined color that has an ARGB value of #FFEEE8AA. |
![]() ![]() | PaleGreen | Gets the system-defined color that has an ARGB value of #FF98FB98. |
![]() ![]() | PaleTurquoise | Gets the system-defined color that has an ARGB value of #FFAFEEEE. |
![]() ![]() | PaleVioletRed | Gets the system-defined color that has an ARGB value of #FFDB7093. |
![]() ![]() | PapayaWhip | Gets the system-defined color that has an ARGB value of #FFFFEFD5. |
![]() ![]() | PeachPuff | Gets the system-defined color that has an ARGB value of #FFFFDAB9. |
![]() ![]() | Peru | Gets the system-defined color that has an ARGB value of #FFCD853F. |
![]() ![]() | Pink | Gets the system-defined color that has an ARGB value of #FFFFC0CB. |
![]() ![]() | Plum | Gets the system-defined color that has an ARGB value of #FFDDA0DD. |
![]() ![]() | PowderBlue | Gets the system-defined color that has an ARGB value of #FFB0E0E6. |
![]() ![]() | Purple | Gets the system-defined color that has an ARGB value of #FF800080. |
![]() ![]() | Red | Gets the system-defined color that has an ARGB value of #FFFF0000. |
![]() ![]() | RosyBrown | Gets the system-defined color that has an ARGB value of #FFBC8F8F. |
![]() ![]() | RoyalBlue | Gets the system-defined color that has an ARGB value of #FF4169E1. |
![]() ![]() | SaddleBrown | Gets the system-defined color that has an ARGB value of #FF8B4513. |
![]() ![]() | Salmon | Gets the system-defined color that has an ARGB value of #FFFA8072. |
![]() ![]() | SandyBrown | Gets the system-defined color that has an ARGB value of #FFF4A460. |
![]() ![]() | SeaGreen | Gets the system-defined color that has an ARGB value of #FF2E8B57. |
![]() ![]() | SeaShell | Gets the system-defined color that has an ARGB value of #FFFFF5EE. |
![]() ![]() | Sienna | Gets the system-defined color that has an ARGB value of #FFA0522D. |
![]() ![]() | Silver | Gets the system-defined color that has an ARGB value of #FFC0C0C0. |
![]() ![]() | SkyBlue | Gets the system-defined color that has an ARGB value of #FF87CEEB. |
![]() ![]() | SlateBlue | Gets the system-defined color that has an ARGB value of #FF6A5ACD. |
![]() ![]() | SlateGray | Gets the system-defined color that has an ARGB value of #FF708090. |
![]() ![]() | Snow | Gets the system-defined color that has an ARGB value of #FFFFFAFA. |
![]() ![]() | SpringGreen | Gets the system-defined color that has an ARGB value of #FF00FF7F. |
![]() ![]() | SteelBlue | Gets the system-defined color that has an ARGB value of #FF4682B4. |
![]() ![]() | Tan | Gets the system-defined color that has an ARGB value of #FFD2B48C. |
![]() ![]() | Teal | Gets the system-defined color that has an ARGB value of #FF008080. |
![]() ![]() | Thistle | Gets the system-defined color that has an ARGB value of #FFD8BFD8. |
![]() ![]() | Tomato | Gets the system-defined color that has an ARGB value of #FFFF6347. |
![]() ![]() | Transparent | Gets the system-defined color that has an ARGB value of #00FFFFFF. |
![]() ![]() | Turquoise | Gets the system-defined color that has an ARGB value of #FF40E0D0. |
![]() ![]() | Violet | Gets the system-defined color that has an ARGB value of #FFEE82EE. |
![]() ![]() | Wheat | Gets the system-defined color that has an ARGB value of #FFF5DEB3. |
![]() ![]() | White | Gets the system-defined color that has an ARGB value of #FFFFFFFF. |
![]() ![]() | WhiteSmoke | Gets the system-defined color that has an ARGB value of #FFF5F5F5. |
![]() ![]() | Yellow | Gets the system-defined color that has an ARGB value of #FFFFFF00. |
![]() ![]() | YellowGreen | Gets the system-defined color that has an ARGB value of #FF9ACD32. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The Windows Presentation Foundation (WPF) color names match the Microsoft .NET Framework version 1.0, Windows Forms, and Microsoft Internet Explorer color names. This representation is based on UNIX X11 named color values.
The following image shows each predefined color, its name, and its hexadecimal value.

See the Brush class for a variety of other more complex ways you can color an area, including gradients (LinearGradientBrush, RadialGradientBrush) or images (ImageBrush).
To paint an area with a solid color, you can use a predefined system brush, such as Red or Blue, or you can create a new SolidColorBrush and describe its Color using alpha, red, green, and blue values. In XAML, you may also paint an area with a solid color by using hexidecimal notation.
The following examples uses each of these techniques to paint a Rectangle blue.
Using a Predefined Brush
In the following example uses the predefined brush Blue to paint a rectangle blue.
<Rectangle Width="50" Height="50" Fill="Blue" />
Using Hexadecimal Notation
The next example uses 8-digit hexadecimal notation to paint a rectangle blue.
<!-- Note that the first two characters "FF" of the 8-digit value is the alpha which controls the transparency of the color. Therefore, to make a completely transparent color (invisible), use "00" for those digits (e.g. #000000FF). --> <Rectangle Width="50" Height="50" Fill="#FF0000FF" />
Using ARGB Values
The next example creates a SolidColorBrush and describes its Color using the ARGB values for the color blue.
<Rectangle Width="50" Height="50"> <Rectangle.Fill> <SolidColorBrush> <SolidColorBrush.Color> <!-- Describes the brush's color using RGB values. Each value has a range of 0-255. R is for red, G is for green, and B is for blue. A is for alpha which controls transparency of the color. Therefore, to make a completely transparent color (invisible), use a value of 0 for Alpha. --> <Color A="255" R="0" G="0" B="255" /> </SolidColorBrush.Color> </SolidColorBrush> </Rectangle.Fill> </Rectangle>
For other ways of describing color, see the Color structure.
Related Topics
For more information about SolidColorBrush and additional examples, see the Painting with Solid Colors and Gradients Overview overview.
This code example is part of a larger example provided for the SolidColorBrush class. For the complete sample, see the Brushes Sample.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
