Skip to content

Quick-tip 33 | A method to allow the use of colors from the color class in the Plot statement

EasyLanguage has two main ways of describing color:

  1. An RGB color value expressed as an integer
  2. 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

AliceBlueDarkSlateGrayLightSalmonPaleVioletRed
AntiqueWhiteDarkTurquoiseLightSeaGreenPapayaWhip
AquaDarkVioletLightSkyBluePeachPuff
AquamarineDeepPinkLightSlateGrayPeru
AzureDeepSkyBlueLightSteelBluePink
BeigeDimGrayLightYellowPlum
BisqueDodgerBlueLimePowderBlue
BlackFirebrickLimeGreenPurple
BlanchedAlmondFloralWhiteLinenRed
BlueForestGreenMagentaRosyBrown
BlueVioletFuschiaMaroonRoyalBlue
BrownGainsboroMediumAquamarineSaddleBrown
BurlywoodGhostWhiteMediumBlueSalmon
CadetBlueGoldMediumOrchidSandyBrown
ChartreuseGoldenrodMediumPurpleSeaGreen
ChocolateGrayMediumSeaGreenSeashell
CoralGreenMediumSlateBlueSienna
CornflowerBlueGreenYellowMediumSpringGreenSilver
CornsilkHoneydewMediumTurquoiseSkyBlue
CyanHotPinkMediumVioletRedSlateBlue
DarkBlueIndianRedMidnightBlueSlateGray
DarkBrownIndigoMintCreamSnow
DarkCyanIvoryMistyRoseSpringGreen
DarkGoldenrodKhakiMoccasinSteelBlue
DarkGrayLavenderNavajoWhiteTan
DarkGreenLavenderBlushNavyTeal
DarkKhakiLawnGreenOldLaceThistle
Dark MagentaLemonChiffonOliveTomato
DarkOliveGreenLightBlueOliveDrabTurquoise
DarkOrangeLightCoralOrangeViolet
DarkOrchidLightCyanOrangeRedWheat
DarkRedLightGoldenrodYellowOrchidWhite
DarkSalmonLightGrayPaleGoldenrodWhiteSmoke
DarkSeaGreenLightGreenPaleGreenYellow
DarkSlateBlueLightPinkPaleTurquoiseYellowGreen