Skip to end of metadata
Go to start of metadata

Represent color.

Definition

public struct Color

Summary

The following table summarizes the members exposed in this structure.

Static Properties

AliceBlue Gets the alice blue.
AntiqueWhite Gets the antique white.
Aqua Gets the aqua.
Aquamarine Gets the aquamarine.
Azure Gets the azure.
Beige Gets the beige.
Bisque Gets the bisque.
Black Gets the black.
BlanchedAlmond Gets the blanched almond.
Blue Gets the blue.
BlueViolet Gets the blue violet.
Brown Gets the brown.
BurlyWood Gets the burly wood.
CadetBlue Gets the cadet blue.
Chartreuse Gets the chartreuse.
Chocolate Gets the chocolate.
Coral Gets the coral.
CornflowerBlue Gets the cornflower blue.
Cornsilk Gets the cornsilk.
Crimson Gets the crimson.
Cyan Gets the cyan.
DarkBlue Gets the dark blue.
DarkCyan Gets the dark cyan.
DarkGoldenrod Gets the dark goldenrod.
DarkGray Gets the dark gray.
DarkGreen Gets the dark green.
DarkKhaki Gets the dark khaki.
DarkMagenta Gets the dark magenta.
DarkOliveGreen Gets the dark olive green.
DarkOrange Gets the dark orange.
DarkOrchid Gets the dark orchid.
DarkRed Gets the dark red.
DarkSalmon Gets the dark salmon.
DarkSeaGreen Gets the dark sea green.
DarkSlateBlue Gets the dark slate blue.
DarkSlateGray Gets the dark slate gray.
DarkTurquoise Gets the dark turquoise.
DarkViolet Gets the dark violet.
DeepPink Gets the deep pink.
DeepSkyBlue Gets the deep sky blue.
DimGray Gets the dim gray.
DodgerBlue Gets the dodger blue.
Firebrick Gets the firebrick.
FloralWhite Gets the floral white.
ForestGreen Gets the forest green.
Fuchsia Gets the fuchsia.
Gainsboro Gets the gainsboro.
GhostWhite Gets the ghost white.
Gold Gets the gold.
Goldenrod Gets the goldenrod.
Gray Gets the gray.
Green Gets the green.
GreenYellow Gets the green yellow.
Honeydew Gets the honeydew.
HotPink Gets the hot pink.
IndianRed Gets the indian red.
Indigo Gets the indigo.
Ivory Gets the ivory.
Khaki Gets the khaki.
Lavender Gets the lavender.
LavenderBlush Gets the lavender blush.
LawnGreen Gets the lawn green.
LemonChiffon Gets the lemon chiffon.
LightBlue Gets the light blue.
LightCoral Gets the light coral.
LightCyan Gets the light cyan.
LightGoldenrodYellow Gets the light goldenrod yellow.
LightGray Gets the light gray.
LightGreen Gets the light green.
LightPink Gets the light pink.
LightSalmon Gets the light salmon.
LightSeaGreen Gets the light sea green.
LightSkyBlue Gets the light sky blue.
LightSlateGray Gets the light slate gray.
LightSteelBlue Gets the light steel blue.
LightYellow Gets the light yellow.
Lime Gets the lime.
LimeGreen Gets the lime green.
Linen Gets the linen.
Magenta Gets the magenta.
Maroon Gets the maroon.
MediumAquamarine Gets the medium aquamarine.
MediumBlue Gets the medium blue.
MediumOrchid Gets the medium orchid.
MediumPurple Gets the medium purple.
MediumSeaGreen Gets the medium sea green.
MediumSlateBlue Gets the medium slate blue.
MediumSpringGreen Gets the medium spring green.
MediumTurquoise Gets the medium turquoise.
MediumVioletRed Gets the medium violet red.
MidnightBlue Gets the midnight blue.
MintCream Gets the mint cream.
MistyRose Gets the misty rose.
Moccasin Gets the moccasin.
NavajoWhite Gets the navajo white.
Navy Gets the navy.
OldLace Gets the old lace.
Olive Gets the olive.
OliveDrab Gets the olive drab.
Orange Gets the orange.
OrangeRed Gets the orange red.
Orchid Gets the orchid.
PaleGoldenrod Gets the pale goldenrod.
PaleGreen Gets the pale green.
PaleTurquoise Gets the pale turquoise.
PaleVioletRed Gets the pale violet red.
PapayaWhip Gets the papaya whip.
PeachPuff Gets the peach puff.
Peru Gets the peru.
Pink Gets the pink.
Plum Gets the plum.
PowderBlue Gets the powder blue.
Purple Gets the purple.
Red Gets the red.
RosyBrown Gets the rosy brown.
RoyalBlue Gets the royal blue.
SaddleBrown Gets the saddle brown.
Salmon Gets the salmon.
SandyBrown Gets the sandy brown.
SeaGreen Gets the sea green.
SeaShell Gets the sea shell.
Sienna Gets the sienna.
Silver Gets the silver.
SkyBlue Gets the sky blue.
SlateBlue Gets the slate blue.
SlateGray Gets the slate gray.
Snow Gets the snow.
SpringGreen Gets the spring green.
SteelBlue Gets the steel blue.
Tan Gets the tan.
Teal Gets the teal.
Thistle Gets the thistle.
Tomato Gets the tomato.
Transparent Gets the transparent.
Turquoise Gets the turquoise.
Violet Gets the violet.
Wheat Gets the wheat.
White Gets the white.
WhiteSmoke Gets the white smoke.
Yellow Gets the yellow.
YellowGreen Gets the yellow green.

Public Properties

A Gets a.
B Gets the b.
G Gets the g.
IsEmpty IsEmpty Property
IsKnownColor Gets a value indicating whether this instance is known color.
IsNamedColor Gets a value indicating whether this instance is named color.
IsSystemColor Gets a value indicating whether this instance is system color.
Name Gets the name.
R Gets the r.

Static Methods

FromArgb(int, int, int) Froms the ARGB.
FromArgb(int, int, int, int) Froms the ARGB.
FromArgb(int, Color) Froms the ARGB.
FromArgb(int) Froms the ARGB.
FromKnownColor(KnownColor) Froms the color of the known.
FromName(string) Froms the name.

Public Methods

Equals(object) Equals Method
GetBrightness() Gets the brightness.
GetHashCode() Reference Equals Method Is commented out because this is handled by the base class. TODO: Is it correct to let the base class handel reference equals
GetHue() Gets the hue.
GetSaturation() Gets the saturation.
ToArgb() To the ARGB.
ToKnownColor() ToKnownColor method
ToString() ToString Method

Static Properties

public static Color AliceBlue { get; }

Gets the alice blue.

public static Color AntiqueWhite { get; }

Gets the antique white.

public static Color Aqua { get; }

Gets the aqua.

public static Color Aquamarine { get; }

Gets the aquamarine.

public static Color Azure { get; }

Gets the azure.

public static Color Beige { get; }

Gets the beige.

public static Color Bisque { get; }

Gets the bisque.

public static Color Black { get; }

Gets the black.

public static Color BlanchedAlmond { get; }

Gets the blanched almond.

public static Color Blue { get; }

Gets the blue.

public static Color BlueViolet { get; }

Gets the blue violet.

public static Color Brown { get; }

Gets the brown.

public static Color BurlyWood { get; }

Gets the burly wood.

public static Color CadetBlue { get; }

Gets the cadet blue.

public static Color Chartreuse { get; }

Gets the chartreuse.

public static Color Chocolate { get; }

Gets the chocolate.

public static Color Coral { get; }

Gets the coral.

public static Color CornflowerBlue { get; }

Gets the cornflower blue.

public static Color Cornsilk { get; }

Gets the cornsilk.

public static Color Crimson { get; }

Gets the crimson.

public static Color Cyan { get; }

Gets the cyan.

public static Color DarkBlue { get; }

Gets the dark blue.

public static Color DarkCyan { get; }

Gets the dark cyan.

public static Color DarkGoldenrod { get; }

Gets the dark goldenrod.

public static Color DarkGray { get; }

Gets the dark gray.

public static Color DarkGreen { get; }

Gets the dark green.

public static Color DarkKhaki { get; }

Gets the dark khaki.

public static Color DarkMagenta { get; }

Gets the dark magenta.

public static Color DarkOliveGreen { get; }

Gets the dark olive green.

public static Color DarkOrange { get; }

Gets the dark orange.

public static Color DarkOrchid { get; }

Gets the dark orchid.

public static Color DarkRed { get; }

Gets the dark red.

public static Color DarkSalmon { get; }

Gets the dark salmon.

public static Color DarkSeaGreen { get; }

Gets the dark sea green.

public static Color DarkSlateBlue { get; }

Gets the dark slate blue.

public static Color DarkSlateGray { get; }

Gets the dark slate gray.

public static Color DarkTurquoise { get; }

Gets the dark turquoise.

public static Color DarkViolet { get; }

Gets the dark violet.

public static Color DeepPink { get; }

Gets the deep pink.

public static Color DeepSkyBlue { get; }

Gets the deep sky blue.

public static Color DimGray { get; }

Gets the dim gray.

public static Color DodgerBlue { get; }

Gets the dodger blue.

public static Color Firebrick { get; }

Gets the firebrick.

public static Color FloralWhite { get; }

Gets the floral white.

public static Color ForestGreen { get; }

Gets the forest green.

public static Color Fuchsia { get; }

Gets the fuchsia.

public static Color Gainsboro { get; }

Gets the gainsboro.

public static Color GhostWhite { get; }

Gets the ghost white.

public static Color Gold { get; }

Gets the gold.

public static Color Goldenrod { get; }

Gets the goldenrod.

public static Color Gray { get; }

Gets the gray.

public static Color Green { get; }

Gets the green.

public static Color GreenYellow { get; }

Gets the green yellow.

public static Color Honeydew { get; }

Gets the honeydew.

public static Color HotPink { get; }

Gets the hot pink.

public static Color IndianRed { get; }

Gets the indian red.

public static Color Indigo { get; }

Gets the indigo.

public static Color Ivory { get; }

Gets the ivory.

public static Color Khaki { get; }

Gets the khaki.

public static Color Lavender { get; }

Gets the lavender.

public static Color LavenderBlush { get; }

Gets the lavender blush.

public static Color LawnGreen { get; }

Gets the lawn green.

public static Color LemonChiffon { get; }

Gets the lemon chiffon.

public static Color LightBlue { get; }

Gets the light blue.

public static Color LightCoral { get; }

Gets the light coral.

public static Color LightCyan { get; }

Gets the light cyan.

public static Color LightGoldenrodYellow { get; }

Gets the light goldenrod yellow.

public static Color LightGray { get; }

Gets the light gray.

public static Color LightGreen { get; }

Gets the light green.

public static Color LightPink { get; }

Gets the light pink.

public static Color LightSalmon { get; }

Gets the light salmon.

public static Color LightSeaGreen { get; }

Gets the light sea green.

public static Color LightSkyBlue { get; }

Gets the light sky blue.

public static Color LightSlateGray { get; }

Gets the light slate gray.

public static Color LightSteelBlue { get; }

Gets the light steel blue.

public static Color LightYellow { get; }

Gets the light yellow.

public static Color Lime { get; }

Gets the lime.

public static Color LimeGreen { get; }

Gets the lime green.

public static Color Linen { get; }

Gets the linen.

public static Color Magenta { get; }

Gets the magenta.

public static Color Maroon { get; }

Gets the maroon.

public static Color MediumAquamarine { get; }

Gets the medium aquamarine.

public static Color MediumBlue { get; }

Gets the medium blue.

public static Color MediumOrchid { get; }

Gets the medium orchid.

public static Color MediumPurple { get; }

Gets the medium purple.

public static Color MediumSeaGreen { get; }

Gets the medium sea green.

public static Color MediumSlateBlue { get; }

Gets the medium slate blue.

public static Color MediumSpringGreen { get; }

Gets the medium spring green.

public static Color MediumTurquoise { get; }

Gets the medium turquoise.

public static Color MediumVioletRed { get; }

Gets the medium violet red.

public static Color MidnightBlue { get; }

Gets the midnight blue.

public static Color MintCream { get; }

Gets the mint cream.

public static Color MistyRose { get; }

Gets the misty rose.

public static Color Moccasin { get; }

Gets the moccasin.

public static Color NavajoWhite { get; }

Gets the navajo white.

public static Color Navy { get; }

Gets the navy.

public static Color OldLace { get; }

Gets the old lace.

public static Color Olive { get; }

Gets the olive.

public static Color OliveDrab { get; }

Gets the olive drab.

public static Color Orange { get; }

Gets the orange.

public static Color OrangeRed { get; }

Gets the orange red.

public static Color Orchid { get; }

Gets the orchid.

public static Color PaleGoldenrod { get; }

Gets the pale goldenrod.

public static Color PaleGreen { get; }

Gets the pale green.

public static Color PaleTurquoise { get; }

Gets the pale turquoise.

public static Color PaleVioletRed { get; }

Gets the pale violet red.

public static Color PapayaWhip { get; }

Gets the papaya whip.

public static Color PeachPuff { get; }

Gets the peach puff.

public static Color Peru { get; }

Gets the peru.

public static Color Pink { get; }

Gets the pink.

public static Color Plum { get; }

Gets the plum.

public static Color PowderBlue { get; }

Gets the powder blue.

public static Color Purple { get; }

Gets the purple.

public static Color Red { get; }

Gets the red.

public static Color RosyBrown { get; }

Gets the rosy brown.

public static Color RoyalBlue { get; }

Gets the royal blue.

public static Color SaddleBrown { get; }

Gets the saddle brown.

public static Color Salmon { get; }

Gets the salmon.

public static Color SandyBrown { get; }

Gets the sandy brown.

public static Color SeaGreen { get; }

Gets the sea green.

public static Color SeaShell { get; }

Gets the sea shell.

public static Color Sienna { get; }

Gets the sienna.

public static Color Silver { get; }

Gets the silver.

public static Color SkyBlue { get; }

Gets the sky blue.

public static Color SlateBlue { get; }

Gets the slate blue.

public static Color SlateGray { get; }

Gets the slate gray.

public static Color Snow { get; }

Gets the snow.

public static Color SpringGreen { get; }

Gets the spring green.

public static Color SteelBlue { get; }

Gets the steel blue.

public static Color Tan { get; }

Gets the tan.

public static Color Teal { get; }

Gets the teal.

public static Color Thistle { get; }

Gets the thistle.

public static Color Tomato { get; }

Gets the tomato.

public static Color Transparent { get; }

Gets the transparent.

public static Color Turquoise { get; }

Gets the turquoise.

public static Color Violet { get; }

Gets the violet.

public static Color Wheat { get; }

Gets the wheat.

public static Color White { get; }

Gets the white.

public static Color WhiteSmoke { get; }

Gets the white smoke.

public static Color Yellow { get; }

Gets the yellow.

public static Color YellowGreen { get; }

Gets the yellow green.

Public Properties

public byte A { get; }

Gets a.

public byte B { get; }

Gets the b.

public byte G { get; }

Gets the g.

public bool IsEmpty { get; }

IsEmpty Property

Remarks

Indicates transparent black. R,G,B = 0; A=0?

public bool IsKnownColor { get; }

Gets a value indicating whether this instance is known color.

public bool IsNamedColor { get; }

Gets a value indicating whether this instance is named color.

public bool IsSystemColor { get; }

Gets a value indicating whether this instance is system color.

public string Name { get; }

Gets the name.

public byte R { get; }

Gets the r.

Static Methods

public static Color FromArgb(int red, int green, int blue)

Froms the ARGB.

Parameters

red The red.
green The green.
blue The blue.

public static Color FromArgb(int alpha, int red, int green, int blue)

Froms the ARGB.

Parameters

alpha The alpha.
red The red.
green The green.
blue The blue.

public static Color FromArgb(int alpha, Color baseColor)

Froms the ARGB.

Parameters

alpha The alpha.
baseColor Color of the base.

public static Color FromArgb(int argb)

Froms the ARGB.

Parameters

argb The ARGB.

public static Color FromKnownColor(KnownColor color)

Froms the color of the known.

Parameters

color The color.

public static Color FromName(string name)

Froms the name.

Parameters

name The name.

Public Methods

public bool Equals(object obj)

Equals Method

Remarks

Checks equivalence of this Color and another object.

Parameters

obj The System.Object to compare with this instance.

Return Types

true if the specified System.Object is equal to this instance; otherwise, false.

public float GetBrightness()

Gets the brightness.

public int GetHashCode()

Reference Equals Method Is commented out because this is handled by the base class. TODO: Is it correct to let the base class handel reference equals

Remarks

Checks equivalence of this Color and another object.

public float GetHue()

Gets the hue.

public float GetSaturation()

Gets the saturation.

public int ToArgb()

To the ARGB.

Return Types

ARGB.

public KnownColor ToKnownColor()

ToKnownColor method

Remarks

Returns the KnownColor enum value for this color, 0 if is not known.

public string ToString()

ToString Method

Remarks

Formats the Color as a string in ARGB notation.
  • No labels