Function returns a numerical color value.  To use this value place a variable to the left so the function can assign it using the equal sign.

 

Function requires values in all three of its parameter fields.  Any and all values can be zero.  All values must be in the range of zero to 255.

Syntax:

'  Create a color based upon the values of the three parameters
ColorValue = ColorRGB( BlueValue, GreenValue, RedValue

 

Parameter:

Description:

BlueValue

GreenValue

RedValue

All three parameter fields and their values can be any integer that begins at  0 and ends at 255.   Each value entered into each of these three parameters determines the color-number this function creates.  Number created is then the value needed to duplicate that color in a chart, or other process where a color value is needed.

 

Example:

'  Assign ColorRGB value to another variable  
'  Generate Red Color Number
ColorValue1 = ColorRGB( 255, 0, 0 )
'  Generate Green Color Number
ColorValue2 = ColorRGB( 0, 255, 0 )
'  Generate Blue C0lor Number
ColorValue3 = ColorRGB( 0, 0, 255 )

 

OR

'  Assign ColorRGB values to chart object function
'  Use Red Color value for data series Line1
chart.AddLineSeries( AsSeries( Line1 ), 100, "Line1", ColorRGB( 255, 0, 0 ) )
'  Use Green Color value for data series Line1
chart.AddLineSeries( AsSeries( Line2 ), 100, "Line2", ColorRGB( 0, 255, 0 ) )
'  Use Blue Color value for data series Line1
chart.AddLineSeries( AsSeries( Line3 ), 100, "Line3", ColorRGB( 0, 0, 255 ) )

 

OR

'  Assign ColorRGB values to SerSeriesColorStyle function
'  Use Red Color value for PlotLine1 series Line1
SetSeriesColorStyle( PlotLine1, ColorRGB( 255, 0, 0 ) )
'  Use Green Color value for PlotLine2 series Line1
SetSeriesColorStyle( PlotLine2, ColorRGB( 0, 255, 0 ) )
'  Use Blue Color value for PlotLine3 series Line1
SetSeriesColorStyle( PlotLine3, ColorRGB( 0, 0, 255 ) )

 

OR

'  Consider a Random number color assignment
'                         Red       GREEN          BLUE
plotColor = ColorRGB( Random(255), Random(255), Random(255) )


Trading Blox Color Selection Dialog:

All BPV Series will provide access to the Trading Blox Color Selection Dialog when the BPV series uses a System, Test or Simulation Scope setting with a BPV numeric series.

 

To display the color selection dialog, follow the click steps in this next image:

TB_BPV_Color_Selection_Dialog_Steps

 

When the "More Colors..." button is clicked the dialog in this next image will appear:

TB_Std_Color_Picker_RGB_Dialog

 

Just about any color's RGB value can be discovered using this dialog.  However, if the chart image where this color is to be used will appear in a report generated with a HTML Browser process that is used to create Trading Blox reports, picking a color from the Basic Color Matrix Table will keep the colors used within the Safe-Color range that are easily reproduced using a HTML process.

 

Applying the RGB, (Red, Green, Blue) values to Trading Blox's ColorRGB function, place the color numbers using Blue, Green and Red as the first, second and third parameter locations

 

Script Color Assignment Examples:

'                       Red  Green  Blue
PlotColor1 = ColorRGB(  255,     0,   0 )   '   Plot Red Color

PlotColor2 = ColorRGB(    0,   255,   0 )   '   Plot Green Color

PlotColor3 = ColorRGB(    0,     0, 255 )   '   Plot Blue Color

 

'  Trade Color Preference Settings Color Numbers values
PlotColor1 = ColorCustom1   '   Use Preference ColorCustom1 Value
PlotColor2 = ColorCustom2   '   Use Preference ColorCustom2 Value
PlotColor3 = ColorCustom3   '   Use Preference ColorCustom3 Value

Returns:

Value returned is the RGB value that results from the combination of the three color values assigned.

 

Links:

AddLineSeries, Colors, SetSeriesColorStyle

See Also:

 

 


Edit Time: 9/25/2017 09:09:58 AM


Topic ID#: 202

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software