Редагувати

Поділитися через


Colors Class

Definition

Implements a set of predefined colors.

public ref class Colors sealed
public sealed class Colors
type Colors = class
Public NotInheritable Class Colors
Inheritance
Colors

Remarks

The Windows Presentation Foundation color names match the .NET Framework and Windows Forms 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.

Predefined colors
Color Table including a color swatch, the color name, and the 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).

XAML Text Usage

You cannot declare this managed class in XAML, but you can use its static properties to assign values in XAML.

Properties

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.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(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)

Applies to

See also