Color Class

Represents an ARGB (alpha, red, green, blue) color.

The Color class may be used to assign a standard or custom foreground and background color to a Forms control or DrawingObject. Example:

label1.ForeColor = elsystem.drawing.color.FromArgb(50,255,125,0); // set label text to custom ARGB color

button1.ForeColor = elsystem.drawing.color.White;    // set button text to white

button1.BackColor = elsystem.drawing.color.DarkBlue; // set button background to dark blue

myTextDO.Color = elsystem.drawing.color.LightGreen;   // set text drawing object to light green;

Namespace: elsystem.drawing

Properties

The following non-color name properties are interspersed with the color names in the EL dictionary, but are listed separately here for clarity.

  Name Type Description
Public property A int Gets the alpha component (transparency) of this color structure, where 0 is fully transparent and 255 is fully opaque.
Public property B int Gets the blue component of this color structure with values from 0 to 255.
Public property Empty object A value indicating that no color has been established for the color object.
Public property G int Gets the green component of this color structure with values from 0 to 255.
Public property IsEmpty bool True if the Color object is actually Color.Empty;
Public property IsKnownColor bool True if this Color object is a predefined known color. See KnownColor for possible values.
Public property IsNamedColor bool True if the Color object was created from a named or known or TS color.
Public property IsSystemColor bool True is the Color object was created from a system color, such as ControlDark, Menu, etc.
Public property IsTSColor bool True if the Color is one of the special TradeStation defined colors, such as TS_UpColor or TS_DnColor.
Public property Name string Gets the name of a Known or TS color, or the hex representation of the color.
Public property Transparent object A transparent color.
Public property R int Gets the red component of this color structure with values from 0 to 255.

The following color names are interspersed with the non-color name properties in the EL dictionary, but are listed separately here for clarity. Each color name represents a color value consisting of the listed Alpha, Red, Green, and Blue components that produce the sample color shown. Bold color names return RGB values equivalent to the EasyLanguage reserved word color names.

To sort the following table, click on a column title to see items in ascending or descending order for that column.

  Color Name Sample Alpha Red Green Blue
Public property AliceBlue   255 240 248 255
Public property AntiqueWhite   255 250 235 215
Public property Aqua   255 0 255 255
Public property Aquamarine   255 127 255 212
Public property Azure   255 240 255 255
Public property Beige   255 245 245 220
Public property Bisque   255 255 228 196
Public property Black   255 0 0 0
Public property BlanchedAlmond   255 255 235 205
Public property Blue   255 0 0 255
Public property BlueViolet   255 138 43 226
Public property Brown   255 165 42 42
Public property Burlywood   255 222 184 135
Public property CadetBlue   255 95 158 160
Public property Chartreuse   255 127 255 0
Public property Chocolate   255 210 105 30
Public property Coral   255 255 127 80
Public property CornflowerBlue   255 100 149 237
Public property Cornsilk   255 255 248 220
Public property Cyan   255 0 255 255
Public property DarkBlue   255 0 0 128
Public property DarkBrown   255 128 128 0
Public property DarkCyan   255 0 128 128
Public property DarkGoldenrod   255 184 134 11
Public property DarkGray   255 128 128 128
Public property DarkGreen   255 0 128 0
Public property DarkKhaki   255 189 183 107
Public property DarkMagenta   255 128 0 128
Public property DarkOliveGreen   255 85 107 47
Public property DarkOrange   255 255 140 0
Public property DarkOrchid   255 153 50 204
Public property DarkRed   255 128 0 0
Public property DarkSalmon   255 233 150 122
Public property DarkSeaGreen   255 143 188 143
Public property DarkSlateBlue   255 72 61 139
Public property DarkSlateGray   255 47 79 79
Public property DarkTurquoise   255 0 206 209
Public property DarkViolet   255 148 0 211
Public property DeepPink   255 255 20 147
Public property DeepSkyBlue   255 0 191 255
Public property DimGray   255 105 105 105
Public property DodgerBlue   255 30 144 255
Public property Firebrick   255 178 34 34
Public property FloralWhite   255 255 250 240
Public property ForestGreen   255 34 139 34
Public property Fuchsia   255 255 0 255
Public property Gainsboro   255 220 220 220
Public property GhostWhite   255 255 250 250
Public property Gold   255 255 215 0
Public property Goldenrod   255 218 165 32
Public property Gray   255 128 128 128
Public property Green   255 0 128 0
Public property GreenYellow   255 173 255 47
Public property Honeydew   255 240 255 240
Public property HotPink   255 255 105 180
Public property IndianRed   255 205 92 92
Public property Indigo   255      
Public property Ivory   255 255 255 240
Public property Khaki   255 240 230 140
Public property Lavender   255 230 230 250
Public property LavenderBlush   255 255 240 245
Public property LawnGreen   255 124 252 0
Public property LemonChiffon   255 255 250 205
Public property LightBlue   255 173 216 230
Public property LightCoral   255 240 128 128
Public property LightCyan   255 224 255 255
Public property LightGoldenrodYellow   255 250 250 210
Public property LightGray   255 192 192 192
Public property LightGreen   255 144 238 144
Public property LightPink   255 255 182 193
Public property LightSalmon   255 255 160 122
Public property LightSeaGreen   255 32 178 170
Public property LightSkyBlue   255 135 206 250
Public property LightSlateGray   255 119 136 153
Public property LightSteelBlue   255 176 196 222
Public property LightYellow   255 255 255 224
Public property Lime   255 0 255 0
Public property LimeGreen   255 50 205 50
Public property Linen   255 250 240 230
Public property Magenta   255 255 0 255
Public property Maroon   255 128 0 0
Public property MediumAquamarine   255 102 205 170
Public property MediumBlue   255 0 0 205
Public property MediumOrchid   255 186 85 211
Public property MediumPurple   255 147 112 219
Public property MediumSeaGreen   255 60 179 113
Public property MediumSlateBlue   255 123 104 238
Public property MediumSpringGreen   255 0 250 154
Public property MediumTurquoise   255 72 209 204
Public property MediumVioletRed   255 199 21 133
Public property MidnightBlue   255 25 25 112
Public property MintCream   255 245 255 250
Public property MistyRose   255 255 228 225
Public property Moccasin   255 255 228 181
Public property NavajoWhite   255 255 222 173
Public property Navy   255 0 0 128
Public property OldLace   255 253 245 230
Public property Olive   255 128 128 0
Public property OliveDrab   255 107 142 35
Public property Orange   255 255 165 0
Public property OrangeRed   255 255 69 0
Public property Orchid   255 218 112 214
Public property PaleGoldenrod   255 238 232 170
Public property PaleGreen   255 152 251 152
Public property PaleTurquoise   255 175 238 238
Public property PaleVioletRed   255 219 112 147
Public property PapayaWhip   255 255 239 213
Public property PeachPuff   255 255 218 185
Public property Peru   255 205 133 63
Public property Pink   255 255 192 203
Public property Plum   255 221 160 221
Public property PowderBlue   255 176 224 230
Public property Purple   255 128 0 128
Public property Red   255 255 0 0
Public property RosyBrown   255 188 143 143
Public property RoyalBlue   255 65 105 225
Public property SaddleBrown   255 139 69 19
Public property Salmon   255 250 128 114
Public property SandyBrown   255 244 164 96
Public property SeaGreen   255 46 139 87
Public property Seashell   255 255 245 238
Public property Sienna   255 160 82 45
Public property Silver   255 192 192 192
Public property SkyBlue   255 135 206 235
Public property SlateBlue   255 106 90 205
Public property SlateGray   255 112 128 144
Public property Snow   255 255 250 250
Public property SpringGreen   255 0 255 127
Public property SteelBlue   255 70 130 180
Public property Tan   255 210 180 140
Public property Teal   255 0 128 128
Public property Thistle   255 216 191 216
Public property Tomato   255 255 99 71
Public property Turquoise   255 64 224 208
Public property Violet   255 238 130 238
Public property Wheat   255 245 222 179
Public property White   255 255 255 255
Public property WhiteSmoke   255 245 245 245
Public property Yellow   255 255 255 0
Public property YellowGreen   255 154 205 50

Bold Names = EasyLanguage Reserved Word color names

Methods

   Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).

  Name Description
Public property CompareARGB(color) Returns true if the Color using this method and the Color provided as a parameter have the same A, R, G, and B values.
Public property Equals(obj) True if the color of obj is the same color as the current Color instance.
Public property FromArgb(color) Returns the system color for an EasyLanguage RGB Color number.
Public property FromArgb (A, baseColor) Returns the system color for specified Alpha value and baseColor object.
Public property FromArgb (A, R, G, B) Returns the system color for specified Alpha, Red, Green, Blue values.
Public property FromArgb(R, G, B) Returns the system color for specified Red, Green, Blue values.
Public property FromKnownColor(color) Creates a Color object for the specified predefined color. See KnownColor for possible values.
Public property FromName(name) Creates a Color object if the specified name string is a KnownColor.
Public property FromNameToRGB(name) Constructs an integer representing the RGB of the specified name string.
Public property GetBrightness Gets the brightness value (HSB) for this Color.
Public property GetHue Gets the hue value (HSB) for this Color.
Public property GetSaturation Gets the saturation value (HSB) for this Color.
Public property ToKnownColor Gets the KnownColor value of this Color object.
Public property ToString Returns a string showing the known name or ARGB values of the Color, such as "Color[Azure]" or "Color [A=255, R=100, G=150, B=200]".
Operators
  Name Description
Public Method <> True when comparing two colors not being equal.
Public Method = True when comparing two colors being equal.
Inheritance Hierarchy

elsystem.Object

elsystem.drawing.Color