GetChartBkColor
- get the RGB color value of chart background

Indicators
(AmiBroker 5.20)


SYNTAX GetChartBkColor()
RETURNS NUMBER
FUNCTION Returns color value of chart background. Color value in AmiBroker is either one of predefined color constants (colorWhite, colorBlack), or RGB value with offset of 56 (number of predefined colors). So to get actual RGB value you need to subtract 56 from the result of that function.
EXAMPLE SetChartBkColor( ParamColor("Color", ColorRGB( 255, 255, 255 ) ) );

rgb =
GetChartBkColor() - 56;

red = ( rgb &
255 );
green =
floor( (rgb/256) & 255 );
blue =
floor( rgb/(256*256) );

Title="R="+ red + " G=" + green + " B=" + blue;

SEE ALSO SetChartBkColor() function , SetChartBkGradientFill() function

References:

The GetChartBkColor function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.