Colors Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Implements a set of predefined colors.
Assembly: System.Windows (in System.Windows.dll)
The Colors type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | Black | Gets the system-defined color that has the ARGB value of #FF000000. |
![]() ![]() | Blue | Gets the system-defined color that has the ARGB value of #FF0000FF. |
![]() ![]() | Brown | Gets the system-defined color that has the ARGB value of #FFA52A2A. |
![]() ![]() | Cyan | Gets the system-defined color that has the ARGB value of #FF00FFFF. |
![]() ![]() | DarkGray | Gets the system-defined color that has the ARGB value of #FFA9A9A9. |
![]() ![]() | Gray | Gets the system-defined color that has the ARGB value of #FF808080. |
![]() ![]() | Green | Gets the system-defined color that has the ARGB value of #FF008000. |
![]() ![]() | LightGray | Gets the system-defined color that has the ARGB value of #FFD3D3D3. |
![]() ![]() | Magenta | Gets the system-defined color that has the ARGB value of #FFFF00FF. |
![]() ![]() | Orange | Gets the system-defined color that has the ARGB value of #FFFFA500. |
![]() ![]() | Purple | Gets the system-defined color that has the ARGB value of #FF800080. |
![]() ![]() | Red | Gets the system-defined color that has the ARGB value of #FFFF0000. |
![]() ![]() | Transparent | Gets the system-defined color that has the ARGB value of #00FFFFFF. |
![]() ![]() | White | Gets the system-defined color that has the ARGB value of #FFFFFFFF. |
![]() ![]() | Yellow | Gets the system-defined color that has the ARGB value of #FFFFFF00. |
| 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 the Object 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.) |
XAML Usage for Colors
You cannot instantiate objects from this managed class in XAML, but you can use its static properties to provide property values in XAML. There are additional named colors that can be specified in XAML, but these are not backed by static property values of Colors. For information about other color usages in XAML, including named colors and ARGB or scARGB syntax, see Color.
The XAML object element usage (with initialization text) is useful for declaring a Color as a resource dictionary.
Note: |
|---|
Windows Phone uses a resource dictionary for theme resources, which includes colors. These color resources are the recommended way to apply color in Windows Phone applications because they ensure UI elements appear consistency and can change color based on the theme the user has selected. For a more consistent user experience, avoid using static colors. For more information, see Theme resources for Windows Phone. |




Note: