Difference between revisions of "LegacyColorValue"

From MultiCharts
Jump to navigation Jump to search
(Created page with "Specifies the color designation scheme to be used for interpretation of numerical color values. ==== Usage ==== </syntaxhighlight>[LegacyColorValue = LogicalValue]<syntaxhi...")
 
m
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
Specifies the color designation scheme to be used for interpretation of numerical color values.  
 
Specifies the color designation scheme to be used for interpretation of numerical color values.  
 
   
 
   
==== Usage ====
+
== Usage ==
</syntaxhighlight>[LegacyColorValue = LogicalValue]<syntaxhighlight>  
+
<syntaxhighlight>[LegacyColorValue = LogicalValue]</syntaxhighlight>  
  
Where: <syntaxhighlight>LogicalValue</syntaxhighlight> - a true/false value; True = Enable; False = Disable  
+
Where:
If the attribute is set to False, or not present in the study's code, the RGB (new) 16M color scheme will be used.  
+
 
If LegacyColorValue the attribute is set to True, the legacy (old) 16-bit, 16-color scheme will be used.  
+
:'''LogicalValue''' - a true/false value; [[True]] = Enable; [[False]] = Disable.
 +
 
 +
::* If the attribute is set to '''False''', or not present in the study's code, the [[RGB]] (new) 16M color scheme will be used.  
 +
::* If LegacyColorValue the attribute is set to '''True''', the legacy (old) 16-bit, 16-color scheme will be used.  
 
   
 
   
==== Notes ====  
+
== Notes ==
When a color name is converted to a numerical color value, the specified scheme will be followed.  
+
* When a color name is converted to a numerical color value, the specified scheme will be followed.
 +
* To ensure compatibility, the attribute [LegacyColorValue = True] is inserted automatically when older versions, prior to v8.1, of EasyLanguage studies are imported.
  
To ensure compatibility, the attribute [LegacyColorValue = True] is inserted automatically when older versions, prior to v8.1, of EasyLanguage studies are imported.
+
== Examples ==
 
==== Example ====
 
 
Enable legacy color value interpretation:  
 
Enable legacy color value interpretation:  
  
 
<syntaxhighlight>[LegacyColorValue = True];</syntaxhighlight>  
 
<syntaxhighlight>[LegacyColorValue = True];</syntaxhighlight>  
  
 
+
Create a [[Green]] color plot using the legacy color scheme:  
Create a Green color plot using the legacy color scheme:  
 
  
 
<syntaxhighlight>[LegacyColorValue = True];  
 
<syntaxhighlight>[LegacyColorValue = True];  
  
 
Plot1(Open);  
 
Plot1(Open);  
 
 
SetPlotColor(1,4);</syntaxhighlight>  
 
SetPlotColor(1,4);</syntaxhighlight>  
  
 
+
Create a Green color plot using the [[RGB]] color scheme:  
Create a Green color plot using the RGB color scheme:  
 
  
 
<syntaxhighlight>[LegacyColorValue = False];  
 
<syntaxhighlight>[LegacyColorValue = False];  
  
 
Plot1(Open);  
 
Plot1(Open);  
 
 
SetPlotColor(1,65280);</syntaxhighlight>  
 
SetPlotColor(1,65280);</syntaxhighlight>  
 
  
 
Assign a value, representing the color Green under the legacy color scheme, to Value1 (Value1 will be assigned a value of 4):  
 
Assign a value, representing the color Green under the legacy color scheme, to Value1 (Value1 will be assigned a value of 4):  
Line 41: Line 38:
 
<syntaxhighlight>[LegacyColorValue = True];  
 
<syntaxhighlight>[LegacyColorValue = True];  
  
Value1=Green;</syntaxhighlight>  
+
Value1 = Green;</syntaxhighlight>  
 
 
  
 
Assign a value, representing the color Green under the RGB color scheme, to Value1 (Value1 will be assigned a value of 65280):  
 
Assign a value, representing the color Green under the RGB color scheme, to Value1 (Value1 will be assigned a value of 65280):  
Line 48: Line 44:
 
<syntaxhighlight>[LegacyColorValue = False];  
 
<syntaxhighlight>[LegacyColorValue = False];  
  
Value1=Green;</syntaxhighlight>
+
Value1 = Green;</syntaxhighlight>
 
 
  
 
[[Category:Attributes]]
 
[[Category:Attributes]]

Latest revision as of 09:40, 19 February 2012

Specifies the color designation scheme to be used for interpretation of numerical color values.

Usage

[LegacyColorValue = LogicalValue]

Where:

LogicalValue - a true/false value; True = Enable; False = Disable.
  • If the attribute is set to False, or not present in the study's code, the RGB (new) 16M color scheme will be used.
  • If LegacyColorValue the attribute is set to True, the legacy (old) 16-bit, 16-color scheme will be used.

Notes

  • When a color name is converted to a numerical color value, the specified scheme will be followed.
  • To ensure compatibility, the attribute [LegacyColorValue = True] is inserted automatically when older versions, prior to v8.1, of EasyLanguage studies are imported.

Examples

Enable legacy color value interpretation:

[LegacyColorValue = True];

Create a Green color plot using the legacy color scheme:

[LegacyColorValue = True]; 

Plot1(Open); 
SetPlotColor(1,4);

Create a Green color plot using the RGB color scheme:

[LegacyColorValue = False]; 

Plot1(Open); 
SetPlotColor(1,65280);

Assign a value, representing the color Green under the legacy color scheme, to Value1 (Value1 will be assigned a value of 4):

[LegacyColorValue = True]; 

Value1 = Green;

Assign a value, representing the color Green under the RGB color scheme, to Value1 (Value1 will be assigned a value of 65280):

[LegacyColorValue = False]; 

Value1 = Green;