
Tutorial 217 is a TradeStation EasyLanguage ShowMe study that demonstrates how to add buttons to a form. The buttons are colored with each of the named color objects available. When a button is clicked in the ShowMe study, the name of the color and the RGB value of the color are displayed at the bottom of the form. To do this a mouse click event is utilized.
All the colors are stored in a vector as string values.
The tutorial demonstrates how to detect when a specific button is mouse clicked and the color of that button. The tutorial also explains how to add the name of the color in either black or white according to the luminance of the color it is being added to. Both of these calculations are done in methods.
A third method is used to output a string for the color object, for example, BlueViolet returns: 14822282 ( RGB 138, 43, 226 )
Summary of methods
HighContrastColor( Color bgColor )
Method to calculate whether white text or black text would provide the greatest contrast with a
specific color (e.g a black button would use white text and a light yellow button would have black text)
LegacyColorFromColObject
Converts color object into useful text

Explanation of tutorial 217
Download the tutorial 217 show me study
TO THE BEST OF MARKPLEX CORPORATION’S KNOWLEDGE, ALL OF THE INFORMATION ON THIS PAGE IS CORRECT, AND IT IS PROVIDED IN THE HOPE THAT IT WILL BE USEFUL. HOWEVER, MARKPLEX CORPORATION ASSUMES NO LIABILITY FOR ANY DAMAGES, DIRECT OR OTHERWISE, RESULTING FROM THE USE OF THIS INFORMATION AND/OR PROGRAM(S) DESCRIBED, AND NO WARRANTY IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION AND/OR PROGRAMS DESCRIBED IS AT YOUR OWN RISK.
ANY EASYLANGUAGE OR POWERLANGUAGE TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (AND PARTS THEREOF) AND ASSOCIATED TECHNIQUES REFERRED TO, INCLUDED IN OR ATTACHED TO THIS TUTORIAL OR PROGRAM DESCRIPTION ARE EXAMPLES ONLY, AND HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. MARKPLEX CORPORATION. DOES NOT RECOMMEND THAT YOU USE ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (OR ANY PARTS THEREOF) OR TECHNIQUES. THE USE OF ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS AND TECHNIQUES DOES NOT GUARANTEE THAT YOU WILL MAKE PROFITS, INCREASE PROFITS, OR MINIMIZE LOSSES.