System::Drawing::Color class

Color class

Represents a color. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.

class Color

Methods

MethodDescription
Color()Constructs an “empty” instance of Color class that does not represent any color.
Equals(const Color&) constDetermines if the current and the specified Color objects represent the same color.
static FromArgb(int)Constructs an instance of Color class that reprsents the specfied color.
static FromArgb(int, int, int, int)Constructs an instance of Color class that reprsents the specfied color.
static FromArgb(int, int, int)Constructs an instance of Color class that reprsents the specfied color with alpha component set to 0xFF.
static FromArgb(int, Color)Constructs an instance of Color class that reprsents the specfied color.
static FromKnownColor(KnownColor)Constructs an instance of Color class that represents the specified known color.
static FromName(const String&)Constructs an instance of Color class that represents a color with the specified name.
get_A() constReturns the value of the alpha component of the color represented by the current object.
static get_AliceBlue()Returns a color whose ARGB value in hexadecimal notation is #FFF0F8FF.
static get_AntiqueWhite()Returns a color whose ARGB value in hexadecimal notation is #FFFAEBD7.
static get_Aqua()Returns a color whose ARGB value in hexadecimal notation is #FF00FFFF.
static get_Aquamarine()Returns a color whose ARGB value in hexadecimal notation is #FF7FFFD4.
static get_Azure()Returns a color whose ARGB value in hexadecimal notation is #FFF0FFFF.
get_B() constReturns the value of the blue component of the color represented by the current object.
static get_Beige()Returns a color whose ARGB value in hexadecimal notation is #FFF5F5DC.
static get_Bisque()Returns a color whose ARGB value in hexadecimal notation is #FFFFE4C4.
static get_Black()Returns a color whose ARGB value in hexadecimal notation is #FF000000.
static get_BlanchedAlmond()Returns a color whose ARGB value in hexadecimal notation is #FFFFEBCD.
static get_Blue()Returns a color whose ARGB value in hexadecimal notation is #FF0000FF.
static get_BlueViolet()Returns a color whose ARGB value in hexadecimal notation is #FF8A2BE2.
static get_Brown()Returns a color whose ARGB value in hexadecimal notation is #FFA52A2A.
static get_BurlyWood()Returns a color whose ARGB value in hexadecimal notation is #FFDEB887.
static get_CadetBlue()Returns a color whose ARGB value in hexadecimal notation is #FF5F9EA0.
static get_Chartreuse()Returns a color whose ARGB value in hexadecimal notation is #FF7FFF00.
static get_Chocolate()Returns a color whose ARGB value in hexadecimal notation is #FFD2691E.
static get_Coral()Returns a color whose ARGB value in hexadecimal notation is #FFFF7F50.
static get_CornflowerBlue()Returns a color whose ARGB value in hexadecimal notation is #FF6495ED.
static get_Cornsilk()Returns a color whose ARGB value in hexadecimal notation is #FFFFF8DC.
static get_Crimson()Returns a color whose ARGB value in hexadecimal notation is #FFDC143C.
static get_Cyan()Returns a color whose ARGB value in hexadecimal notation is #FF00FFFF.
static get_DarkBlue()Returns a color whose ARGB value in hexadecimal notation is #FF00008B.
static get_DarkCyan()Returns a color whose ARGB value in hexadecimal notation is #FF008B8B.
static get_DarkGoldenrod()Returns a color whose ARGB value in hexadecimal notation is #FFB8860B.
static get_DarkGray()Returns a color whose ARGB value in hexadecimal notation is #FFA9A9A9.
static get_DarkGreen()Returns a color whose ARGB value in hexadecimal notation is #FF006400.
static get_DarkKhaki()Returns a color whose ARGB value in hexadecimal notation is #FFBDB76B.
static get_DarkMagenta()Returns a color whose ARGB value in hexadecimal notation is #FF8B008B.
static get_DarkOliveGreen()Returns a color whose ARGB value in hexadecimal notation is #FF556B2F.
static get_DarkOrange()Returns a color whose ARGB value in hexadecimal notation is #FFFF8C00.
static get_DarkOrchid()Returns a color whose ARGB value in hexadecimal notation is #FF9932CC.
static get_DarkRed()Returns a color whose ARGB value in hexadecimal notation is #FF8B0000.
static get_DarkSalmon()Returns a color whose ARGB value in hexadecimal notation is #FFE9967A.
static get_DarkSeaGreen()Returns a color whose ARGB value in hexadecimal notation is #FF8FBC8F.
static get_DarkSlateBlue()Returns a color whose ARGB value in hexadecimal notation is #FF483D8B.
static get_DarkSlateGray()Returns a color whose ARGB value in hexadecimal notation is #FF2F4F4F.
static get_DarkTurquoise()Returns a color whose ARGB value in hexadecimal notation is #FF00CED1.
static get_DarkViolet()Returns a color whose ARGB value in hexadecimal notation is #FF9400D3.
static get_DeepPink()Returns a color whose ARGB value in hexadecimal notation is #FFFF1493.
static get_DeepSkyBlue()Returns a color whose ARGB value in hexadecimal notation is #FF00BFFF.
static get_DimGray()Returns a color whose ARGB value in hexadecimal notation is #FF696969.
static get_DodgerBlue()Returns a color whose ARGB value in hexadecimal notation is #FF1E90FF.
static get_Firebrick()Returns a color whose ARGB value in hexadecimal notation is #FFB22222.
static get_FloralWhite()Returns a color whose ARGB value in hexadecimal notation is #FFFFFAF0.
static get_ForestGreen()Returns a color whose ARGB value in hexadecimal notation is #FF228B22.
static get_Fuchsia()Returns a color whose ARGB value in hexadecimal notation is #FFFF00FF.
get_G() constReturns the value of the green component of the color represented by the current object.
static get_Gainsboro()Returns a color whose ARGB value in hexadecimal notation is #FFDCDCDC.
static get_GhostWhite()Returns a color whose ARGB value in hexadecimal notation is #FFF8F8FF.
static get_Gold()Returns a color whose ARGB value in hexadecimal notation is #FFFFD700.
static get_Goldenrod()Returns a color whose ARGB value in hexadecimal notation is #FFDAA520.
static get_Gray()Returns a color whose ARGB value in hexadecimal notation is #FF808080.
static get_Green()Returns a color whose ARGB value in hexadecimal notation is #FF008000.
static get_GreenYellow()Returns a color whose ARGB value in hexadecimal notation is #FFADFF2F.
static get_Honeydew()Returns a color whose ARGB value in hexadecimal notation is #FFF0FFF0.
static get_HotPink()Returns a color whose ARGB value in hexadecimal notation is #FFFF69B4.
static get_IndianRed()Returns a color whose ARGB value in hexadecimal notation is #FFCD5C5C.
static get_Indigo()Returns a color whose ARGB value in hexadecimal notation is #FF4B0082.
get_IsEmpty() constReturns a value that indicate if the current object is “empty” i.e. does not represent any color.
get_IsNamedColor() constReturns a value that determines whether the Color structure represents a named color or a member of the KnownColor enumeration.
static get_Ivory()Returns a color whose ARGB value in hexadecimal notation is #FFFFFFF0.
static get_Khaki()Returns a color whose ARGB value in hexadecimal notation is #FFF0E68C.
static get_Lavender()Returns a color whose ARGB value in hexadecimal notation is #FFE6E6FA.
static get_LavenderBlush()Returns a color whose ARGB value in hexadecimal notation is #FFFFF0F5.
static get_LawnGreen()Returns a color whose ARGB value in hexadecimal notation is #FF7CFC00.
static get_LemonChiffon()Returns a color whose ARGB value in hexadecimal notation is #FFFFFACD.
static get_LightBlue()Returns a color whose ARGB value in hexadecimal notation is #FFADD8E6.
static get_LightCoral()Returns a color whose ARGB value in hexadecimal notation is #FFF08080.
static get_LightCyan()Returns a color whose ARGB value in hexadecimal notation is #FFE0FFFF.
static get_LightGoldenrodYellow()Returns a color whose ARGB value in hexadecimal notation is #FFFAFAD2.
static get_LightGray()Returns a color whose ARGB value in hexadecimal notation is #FFD3D3D3.
static get_LightGreen()Returns a color whose ARGB value in hexadecimal notation is #FF90EE90.
static get_LightPink()Returns a color whose ARGB value in hexadecimal notation is #FFFFB6C1.
static get_LightSalmon()Returns a color whose ARGB value in hexadecimal notation is #FFFFA07A.
static get_LightSeaGreen()Returns a color whose ARGB value in hexadecimal notation is #FF20B2AA.
static get_LightSkyBlue()Returns a color whose ARGB value in hexadecimal notation is #FF87CEFA.
static get_LightSlateGray()Returns a color whose ARGB value in hexadecimal notation is #FF778899.
static get_LightSteelBlue()Returns a color whose ARGB value in hexadecimal notation is #FFB0C4DE.
static get_LightYellow()Returns a color whose ARGB value in hexadecimal notation is #FFFFFFE0.
static get_Lime()Returns a color whose ARGB value in hexadecimal notation is #FF00FF00.
static get_LimeGreen()Returns a color whose ARGB value in hexadecimal notation is #FF32CD32.
static get_Linen()Returns a color whose ARGB value in hexadecimal notation is #FFFAF0E6.
static get_Magenta()Returns a color whose ARGB value in hexadecimal notation is #FFFF00FF.
static get_Maroon()Returns a color whose ARGB value in hexadecimal notation is #FF800000.
static get_MediumAquamarine()Returns a color whose ARGB value in hexadecimal notation is #FF66CDAA.
static get_MediumBlue()Returns a color whose ARGB value in hexadecimal notation is #FF0000CD.
static get_MediumOrchid()Returns a color whose ARGB value in hexadecimal notation is #FFBA55D3.
static get_MediumPurple()Returns a color whose ARGB value in hexadecimal notation is #FF9370DB.
static get_MediumSeaGreen()Returns a color whose ARGB value in hexadecimal notation is #FF3CB371.
static get_MediumSlateBlue()Returns a color whose ARGB value in hexadecimal notation is #FF7B68EE.
static get_MediumSpringGreen()Returns a color whose ARGB value in hexadecimal notation is #FF00FA9A.
static get_MediumTurquoise()Returns a color whose ARGB value in hexadecimal notation is #FF48D1CC.
static get_MediumVioletRed()Returns a color whose ARGB value in hexadecimal notation is #FFC71585.
static get_MidnightBlue()Returns a color whose ARGB value in hexadecimal notation is #FF191970.
static get_MintCream()Returns a color whose ARGB value in hexadecimal notation is #FFF5FFFA.
static get_MistyRose()Returns a color whose ARGB value in hexadecimal notation is #FFFFE4E1.
static get_Moccasin()Returns a color whose ARGB value in hexadecimal notation is #FFFFE4B5.
get_Name() constReturns the name of the color represented by the current object.
static get_NavajoWhite()Returns a color whose ARGB value in hexadecimal notation is #FFFFDEAD.
static get_Navy()Returns a color whose ARGB value in hexadecimal notation is #FF000080.
static get_OldLace()Returns a color whose ARGB value in hexadecimal notation is #FFFDF5E6.
static get_Olive()Returns a color whose ARGB value in hexadecimal notation is #FF808000.
static get_OliveDrab()Returns a color whose ARGB value in hexadecimal notation is #FF6B8E23.
static get_Orange()Returns a color whose ARGB value in hexadecimal notation is #FFFFA500.
static get_OrangeRed()Returns a color whose ARGB value in hexadecimal notation is #FFFF4500.
static get_Orchid()Returns a color whose ARGB value in hexadecimal notation is #FFDA70D6.
static get_PaleGoldenrod()Returns a color whose ARGB value in hexadecimal notation is #FFEEE8AA.
static get_PaleGreen()Returns a color whose ARGB value in hexadecimal notation is #FF98FB98.
static get_PaleTurquoise()Returns a color whose ARGB value in hexadecimal notation is #FFAFEEEE.
static get_PaleVioletRed()Returns a color whose ARGB value in hexadecimal notation is #FFDB7093.
static get_PapayaWhip()Returns a color whose ARGB value in hexadecimal notation is #FFFFEFD5.
static get_PeachPuff()Returns a color whose ARGB value in hexadecimal notation is #FFFFDAB9.
static get_Peru()Returns a color whose ARGB value in hexadecimal notation is #FFCD853F.
static get_Pink()Returns a color whose ARGB value in hexadecimal notation is #FFFFC0CB.
static get_Plum()Returns a color whose ARGB value in hexadecimal notation is #FFDDA0DD.
static get_PowderBlue()Returns a color whose ARGB value in hexadecimal notation is #FFB0E0E6.
static get_Purple()Returns a color whose ARGB value in hexadecimal notation is #FF800080.
get_R() constReturns the value of the red component of the color represented by the current object.
static get_Red()Returns a color whose ARGB value in hexadecimal notation is #FFFF0000.
static get_RosyBrown()Returns a color whose ARGB value in hexadecimal notation is #FFBC8F8F.
static get_RoyalBlue()Returns a color whose ARGB value in hexadecimal notation is #FF4169E1.
static get_SaddleBrown()Returns a color whose ARGB value in hexadecimal notation is #FF8B4513.
static get_Salmon()Returns a color whose ARGB value in hexadecimal notation is #FFFA8072.
static get_SandyBrown()Returns a color whose ARGB value in hexadecimal notation is #FFF4A460.
static get_SeaGreen()Returns a color whose ARGB value in hexadecimal notation is #FF2E8B57.
static get_SeaShell()Returns a color whose ARGB value in hexadecimal notation is #FFFFF5EE.
static get_Sienna()Returns a color whose ARGB value in hexadecimal notation is #FFA0522D.
static get_Silver()Returns a color whose ARGB value in hexadecimal notation is #FFC0C0C0.
static get_SkyBlue()Returns a color whose ARGB value in hexadecimal notation is #FF87CEEB.
static get_SlateBlue()Returns a color whose ARGB value in hexadecimal notation is #FF6A5ACD.
static get_SlateGray()Returns a color whose ARGB value in hexadecimal notation is #FF708090.
static get_Snow()Returns a color whose ARGB value in hexadecimal notation is #FFFFFAFA.
static get_SpringGreen()Returns a color whose ARGB value in hexadecimal notation is #FF00FF7F.
static get_SteelBlue()Returns a color whose ARGB value in hexadecimal notation is #FF4682B4.
static get_Tan()Returns a color whose ARGB value in hexadecimal notation is #FFD2B48C.
static get_Teal()Returns a color whose ARGB value in hexadecimal notation is #FF008080.
static get_Thistle()Returns a color whose ARGB value in hexadecimal notation is #FFD8BFD8.
static get_Tomato()Returns a color whose ARGB value in hexadecimal notation is #FFFF6347.
static get_Transparent()Returns a color whose ARGB value in hexadecimal notation is #00FFFFFF.
static get_Turquoise()Returns a color whose ARGB value in hexadecimal notation is #FF40E0D0.
static get_Violet()Returns a color whose ARGB value in hexadecimal notation is #FFEE82EE.
static get_Wheat()Returns a color whose ARGB value in hexadecimal notation is #FFF5DEB3.
static get_White()Returns a color whose ARGB value in hexadecimal notation is #FFFFFFFF.
static get_WhiteSmoke()Returns a color whose ARGB value in hexadecimal notation is #FFF5F5F5.
static get_Yellow()Returns a color whose ARGB value in hexadecimal notation is #FFFFFF00.
static get_YellowGreen()Returns a color whose ARGB value in hexadecimal notation is #FF9ACD32.
GetBrightness()Returns the brightness component of the color reprsented by the current object.
GetHashCode() constReturns the hash code of the current object.
GetHue()Returns the Hue-Saturation-Brightness (HSB) hue value, in degrees, for the color reprsented by the current object.
GetSaturation()Returns the Hue-Saturation-Brightness (HSB) saturation for the color reprsented by the current object.
IsNull() constAlways returns false.
operator!=(const std::nullptr_t&) constAlways returns true.
operator!=(const Color&) constDetermines if the current and the specified Color objects represent distinct colors.
operator==(const std::nullptr_t&) constAlways returns false.
operator==(const Color&) constDetermines if the current and the specified Color objects represent the same color.
ToArgb() constReturns a 32-bit ARGB value of the color represented by the current object.
ToString() constReturns the string representation of the current object.

Fields

FieldDescription
static EmptyAn “empty” instance of Color class i.e. an instance that does not represent any color.

See Also