Click or drag to resize

Color Structure

Represents a 32-bit ARGB color (alpha + red + green + blue, each 0–255). Used throughout the ExpertPdf public API.
Inheritance Hierarchy
SystemObject
  SystemValueType
    ExpertPdf.Anywhere.DrawingColor

Namespace: ExpertPdf.Anywhere.Drawing
Assembly: ExpertPdf.Anywhere (in ExpertPdf.Anywhere.dll) Version: 22.0
Syntax
public struct Color : IEquatable<Color>

The Color type exposes the following members.

Properties
 NameDescription
Public propertyAThe alpha component (0 = fully transparent, 255 = fully opaque).
Public propertyStatic memberAliceBlueThe color AliceBlue (#F0F8FF).
Public propertyStatic memberAntiqueWhiteThe color AntiqueWhite (#FAEBD7).
Public propertyStatic memberAquaThe color Aqua (#00FFFF).
Public propertyStatic memberAquamarineThe color Aquamarine (#7FFFD4).
Public propertyStatic memberAzureThe color Azure (#F0FFFF).
Public propertyBThe blue component (0–255).
Public propertyStatic memberBeigeThe color Beige (#F5F5DC).
Public propertyStatic memberBisqueThe color Bisque (#FFE4C4).
Public propertyStatic memberBlackThe color Black (#000000).
Public propertyStatic memberBlanchedAlmondThe color BlanchedAlmond (#FFEBCD).
Public propertyStatic memberBlueThe color Blue (#0000FF).
Public propertyStatic memberBlueVioletThe color BlueViolet (#8A2BE2).
Public propertyStatic memberBrownThe color Brown (#A52A2A).
Public propertyStatic memberBurlyWoodThe color BurlyWood (#DEB887).
Public propertyStatic memberCadetBlueThe color CadetBlue (#5F9EA0).
Public propertyStatic memberChartreuseThe color Chartreuse (#7FFF00).
Public propertyStatic memberChocolateThe color Chocolate (#D2691E).
Public propertyStatic memberCoralThe color Coral (#FF7F50).
Public propertyStatic memberCornflowerBlueThe color CornflowerBlue (#6495ED).
Public propertyStatic memberCornsilkThe color Cornsilk (#FFF8DC).
Public propertyStatic memberCrimsonThe color Crimson (#DC143C).
Public propertyStatic memberCyanThe color Cyan (#00FFFF).
Public propertyStatic memberDarkBlueThe color DarkBlue (#00008B).
Public propertyStatic memberDarkCyanThe color DarkCyan (#008B8B).
Public propertyStatic memberDarkGoldenrodThe color DarkGoldenrod (#B8860B).
Public propertyStatic memberDarkGrayThe color DarkGray (#A9A9A9).
Public propertyStatic memberDarkGreenThe color DarkGreen (#006400).
Public propertyStatic memberDarkKhakiThe color DarkKhaki (#BDB76B).
Public propertyStatic memberDarkMagentaThe color DarkMagenta (#8B008B).
Public propertyStatic memberDarkOliveGreenThe color DarkOliveGreen (#556B2F).
Public propertyStatic memberDarkOrangeThe color DarkOrange (#FF8C00).
Public propertyStatic memberDarkOrchidThe color DarkOrchid (#9932CC).
Public propertyStatic memberDarkRedThe color DarkRed (#8B0000).
Public propertyStatic memberDarkSalmonThe color DarkSalmon (#E9967A).
Public propertyStatic memberDarkSeaGreenThe color DarkSeaGreen (#8FBC8F).
Public propertyStatic memberDarkSlateBlueThe color DarkSlateBlue (#483D8B).
Public propertyStatic memberDarkSlateGrayThe color DarkSlateGray (#2F4F4F).
Public propertyStatic memberDarkTurquoiseThe color DarkTurquoise (#00CED1).
Public propertyStatic memberDarkVioletThe color DarkViolet (#9400D3).
Public propertyStatic memberDeepPinkThe color DeepPink (#FF1493).
Public propertyStatic memberDeepSkyBlueThe color DeepSkyBlue (#00BFFF).
Public propertyStatic memberDimGrayThe color DimGray (#696969).
Public propertyStatic memberDodgerBlueThe color DodgerBlue (#1E90FF).
Public propertyStatic memberFirebrickThe color Firebrick (#B22222).
Public propertyStatic memberFloralWhiteThe color FloralWhite (#FFFAF0).
Public propertyStatic memberForestGreenThe color ForestGreen (#228B22).
Public propertyStatic memberFuchsiaThe color Fuchsia (#FF00FF).
Public propertyGThe green component (0–255).
Public propertyStatic memberGainsboroThe color Gainsboro (#DCDCDC).
Public propertyStatic memberGhostWhiteThe color GhostWhite (#F8F8FF).
Public propertyStatic memberGoldThe color Gold (#FFD700).
Public propertyStatic memberGoldenrodThe color Goldenrod (#DAA520).
Public propertyStatic memberGrayThe color Gray (#808080).
Public propertyStatic memberGreenThe color Green (#008000).
Public propertyStatic memberGreenYellowThe color GreenYellow (#ADFF2F).
Public propertyStatic memberHoneydewThe color Honeydew (#F0FFF0).
Public propertyStatic memberHotPinkThe color HotPink (#FF69B4).
Public propertyStatic memberIndianRedThe color IndianRed (#CD5C5C).
Public propertyStatic memberIndigoThe color Indigo (#4B0082).
Public propertyIsEmptyTrue if this is the default (uninitialized) value of Color.
Public propertyStatic memberIvoryThe color Ivory (#FFFFF0).
Public propertyStatic memberKhakiThe color Khaki (#F0E68C).
Public propertyStatic memberLavenderThe color Lavender (#E6E6FA).
Public propertyStatic memberLavenderBlushThe color LavenderBlush (#FFF0F5).
Public propertyStatic memberLawnGreenThe color LawnGreen (#7CFC00).
Public propertyStatic memberLemonChiffonThe color LemonChiffon (#FFFACD).
Public propertyStatic memberLightBlueThe color LightBlue (#ADD8E6).
Public propertyStatic memberLightCoralThe color LightCoral (#F08080).
Public propertyStatic memberLightCyanThe color LightCyan (#E0FFFF).
Public propertyStatic memberLightGoldenrodYellowThe color LightGoldenrodYellow (#FAFAD2).
Public propertyStatic memberLightGrayThe color LightGray (#D3D3D3).
Public propertyStatic memberLightGreenThe color LightGreen (#90EE90).
Public propertyStatic memberLightPinkThe color LightPink (#FFB6C1).
Public propertyStatic memberLightSalmonThe color LightSalmon (#FFA07A).
Public propertyStatic memberLightSeaGreenThe color LightSeaGreen (#20B2AA).
Public propertyStatic memberLightSkyBlueThe color LightSkyBlue (#87CEFA).
Public propertyStatic memberLightSlateGrayThe color LightSlateGray (#778899).
Public propertyStatic memberLightSteelBlueThe color LightSteelBlue (#B0C4DE).
Public propertyStatic memberLightYellowThe color LightYellow (#FFFFE0).
Public propertyStatic memberLimeThe color Lime (#00FF00).
Public propertyStatic memberLimeGreenThe color LimeGreen (#32CD32).
Public propertyStatic memberLinenThe color Linen (#FAF0E6).
Public propertyStatic memberMagentaThe color Magenta (#FF00FF).
Public propertyStatic memberMaroonThe color Maroon (#800000).
Public propertyStatic memberMediumAquamarineThe color MediumAquamarine (#66CDAA).
Public propertyStatic memberMediumBlueThe color MediumBlue (#0000CD).
Public propertyStatic memberMediumOrchidThe color MediumOrchid (#BA55D3).
Public propertyStatic memberMediumPurpleThe color MediumPurple (#9370DB).
Public propertyStatic memberMediumSeaGreenThe color MediumSeaGreen (#3CB371).
Public propertyStatic memberMediumSlateBlueThe color MediumSlateBlue (#7B68EE).
Public propertyStatic memberMediumSpringGreenThe color MediumSpringGreen (#00FA9A).
Public propertyStatic memberMediumTurquoiseThe color MediumTurquoise (#48D1CC).
Public propertyStatic memberMediumVioletRedThe color MediumVioletRed (#C71585).
Public propertyStatic memberMidnightBlueThe color MidnightBlue (#191970).
Public propertyStatic memberMintCreamThe color MintCream (#F5FFFA).
Public propertyStatic memberMistyRoseThe color MistyRose (#FFE4E1).
Public propertyStatic memberMoccasinThe color Moccasin (#FFE4B5).
Public propertyStatic memberNavajoWhiteThe color NavajoWhite (#FFDEAD).
Public propertyStatic memberNavyThe color Navy (#000080).
Public propertyStatic memberOldLaceThe color OldLace (#FDF5E6).
Public propertyStatic memberOliveThe color Olive (#808000).
Public propertyStatic memberOliveDrabThe color OliveDrab (#6B8E23).
Public propertyStatic memberOrangeThe color Orange (#FFA500).
Public propertyStatic memberOrangeRedThe color OrangeRed (#FF4500).
Public propertyStatic memberOrchidThe color Orchid (#DA70D6).
Public propertyStatic memberPaleGoldenrodThe color PaleGoldenrod (#EEE8AA).
Public propertyStatic memberPaleGreenThe color PaleGreen (#98FB98).
Public propertyStatic memberPaleTurquoiseThe color PaleTurquoise (#AFEEEE).
Public propertyStatic memberPaleVioletRedThe color PaleVioletRed (#DB7093).
Public propertyStatic memberPapayaWhipThe color PapayaWhip (#FFEFD5).
Public propertyStatic memberPeachPuffThe color PeachPuff (#FFDAB9).
Public propertyStatic memberPeruThe color Peru (#CD853F).
Public propertyStatic memberPinkThe color Pink (#FFC0CB).
Public propertyStatic memberPlumThe color Plum (#DDA0DD).
Public propertyStatic memberPowderBlueThe color PowderBlue (#B0E0E6).
Public propertyStatic memberPurpleThe color Purple (#800080).
Public propertyRThe red component (0–255).
Public propertyStatic memberRebeccaPurpleThe color RebeccaPurple (#663399).
Public propertyStatic memberRedThe color Red (#FF0000).
Public propertyStatic memberRosyBrownThe color RosyBrown (#BC8F8F).
Public propertyStatic memberRoyalBlueThe color RoyalBlue (#4169E1).
Public propertyStatic memberSaddleBrownThe color SaddleBrown (#8B4513).
Public propertyStatic memberSalmonThe color Salmon (#FA8072).
Public propertyStatic memberSandyBrownThe color SandyBrown (#F4A460).
Public propertyStatic memberSeaGreenThe color SeaGreen (#2E8B57).
Public propertyStatic memberSeaShellThe color SeaShell (#FFF5EE).
Public propertyStatic memberSiennaThe color Sienna (#A0522D).
Public propertyStatic memberSilverThe color Silver (#C0C0C0).
Public propertyStatic memberSkyBlueThe color SkyBlue (#87CEEB).
Public propertyStatic memberSlateBlueThe color SlateBlue (#6A5ACD).
Public propertyStatic memberSlateGrayThe color SlateGray (#708090).
Public propertyStatic memberSnowThe color Snow (#FFFAFA).
Public propertyStatic memberSpringGreenThe color SpringGreen (#00FF7F).
Public propertyStatic memberSteelBlueThe color SteelBlue (#4682B4).
Public propertyStatic memberTanThe color Tan (#D2B48C).
Public propertyStatic memberTealThe color Teal (#008080).
Public propertyStatic memberThistleThe color Thistle (#D8BFD8).
Public propertyStatic memberTomatoThe color Tomato (#FF6347).
Public propertyStatic memberTransparentA fully transparent color (A=0).
Public propertyStatic memberTurquoiseThe color Turquoise (#40E0D0).
Public propertyStatic memberVioletThe color Violet (#EE82EE).
Public propertyStatic memberWheatThe color Wheat (#F5DEB3).
Public propertyStatic memberWhiteThe color White (#FFFFFF).
Public propertyStatic memberWhiteSmokeThe color WhiteSmoke (#F5F5F5).
Public propertyStatic memberYellowThe color Yellow (#FFFF00).
Public propertyStatic memberYellowGreenThe color YellowGreen (#9ACD32).
Top
Methods
 NameDescription
Public methodEquals(Color)Indicates whether this color and the specified Color have the same ARGB value.
Public methodEquals(Object)Indicates whether this color and the specified object have the same value.
(Overrides ValueTypeEquals(Object))
Public methodStatic memberFromArgb(Int32) Constructs a color from a raw 32-bit ARGB value (layout: AARRGGBB).
Public methodStatic memberFromArgb(Int32, Color) Constructs a color by replacing the alpha component of an existing color.
Public methodStatic memberFromArgb(Int32, Int32, Int32) Constructs a fully-opaque color from the given red/green/blue components.
Public methodStatic memberFromArgb(Int32, Int32, Int32, Int32) Constructs a color with the given alpha/red/green/blue components. Each value is clamped to 0–255.
Public methodGetHashCodeReturns the hash code for this color.
(Overrides ValueTypeGetHashCode)
Public methodToArgbGets the raw 32-bit ARGB value (layout: AARRGGBB).
Public methodToStringReturns a string representation of this Color (its A, R, G and B components).
(Overrides ValueTypeToString)
Top
Operators
 NameDescription
Public operatorStatic memberEquality(Color, Color)Returns true if the two colors have identical ARGB values.
Public operatorStatic memberInequality(Color, Color)Returns true if the two colors have different ARGB values.
Top
Fields
 NameDescription
Public fieldStatic memberEmpty Represents the uninitialized color (all components zero, including alpha). Distinct from fully-transparent black, which is the same bit pattern but created explicitly. Callers check IsEmpty before use if the color might not have been set.
Top
Remarks
The named colors of System.Drawing.Color are available with the same names and values (Navy, WhiteSmoke, SteelBlue and so on); any other color is made with FromArgb(Int32, Int32, Int32). A color converts implicitly to PdfColor.
Example
ExpertPdf.Anywhere.Drawing.Color navy =
    ExpertPdf.Anywhere.Drawing.Color.FromArgb(0, 0, 128);
ExpertPdf.Anywhere.Drawing.Color faded =
    ExpertPdf.Anywhere.Drawing.Color.FromArgb(128, navy);
int argb = navy.ToArgb();
byte red = navy.R;
See Also