EasyLanguage has two main ways of describing color:
- An RGB color value expressed as an integer
- The newer color class, described by strings (see the list below if you are not familiar with them.)
The Plot statement and the original drawing object tools (e.g. TL_SetColor) expect the first sort of color value. The more recently introduced drawing objects (e.g. Trendline, Button, Label) expect the second.
But what if you wish to use one of the colors in the color class when you are plotting something? Quick tip 33 demonstrates a simple method that does the conversion from a string to an RGB color value integer.
The method is called as follows: Value1 = LegacyColorFromColObject( Color1 ) where Color1 is a string representing the name of a color object. For example, it could be used in a plot statement as follows:
Plot1( C, "Close", LegacyColorFromColObject( Color1 ) );
The example showme study can be downloaded by Gold Pass members, below.
This quick-tip does not apply to MultiCharts users.
Quick-tip 33 video
Gold pass download
This content is for members only.Colors
AliceBlue | DarkSlateGray | LightSalmon | PaleVioletRed |
AntiqueWhite | DarkTurquoise | LightSeaGreen | PapayaWhip |
Aqua | DarkViolet | LightSkyBlue | PeachPuff |
Aquamarine | DeepPink | LightSlateGray | Peru |
Azure | DeepSkyBlue | LightSteelBlue | Pink |
Beige | DimGray | LightYellow | Plum |
Bisque | DodgerBlue | Lime | PowderBlue |
Black | Firebrick | LimeGreen | Purple |
BlanchedAlmond | FloralWhite | Linen | Red |
Blue | ForestGreen | Magenta | RosyBrown |
BlueViolet | Fuschia | Maroon | RoyalBlue |
Brown | Gainsboro | MediumAquamarine | SaddleBrown |
Burlywood | GhostWhite | MediumBlue | Salmon |
CadetBlue | Gold | MediumOrchid | SandyBrown |
Chartreuse | Goldenrod | MediumPurple | SeaGreen |
Chocolate | Gray | MediumSeaGreen | Seashell |
Coral | Green | MediumSlateBlue | Sienna |
CornflowerBlue | GreenYellow | MediumSpringGreen | Silver |
Cornsilk | Honeydew | MediumTurquoise | SkyBlue |
Cyan | HotPink | MediumVioletRed | SlateBlue |
DarkBlue | IndianRed | MidnightBlue | SlateGray |
DarkBrown | Indigo | MintCream | Snow |
DarkCyan | Ivory | MistyRose | SpringGreen |
DarkGoldenrod | Khaki | Moccasin | SteelBlue |
DarkGray | Lavender | NavajoWhite | Tan |
DarkGreen | LavenderBlush | Navy | Teal |
DarkKhaki | LawnGreen | OldLace | Thistle |
Dark Magenta | LemonChiffon | Olive | Tomato |
DarkOliveGreen | LightBlue | OliveDrab | Turquoise |
DarkOrange | LightCoral | Orange | Violet |
DarkOrchid | LightCyan | OrangeRed | Wheat |
DarkRed | LightGoldenrodYellow | Orchid | White |
DarkSalmon | LightGray | PaleGoldenrod | WhiteSmoke |
DarkSeaGreen | LightGreen | PaleGreen | Yellow |
DarkSlateBlue | LightPink | PaleTurquoise | YellowGreen |