Skip to main content

Function: bgcolor()

bgcolor(color, pane?): void

Shade this bar's background (Pine bgcolor). Call it on the bars it applies to; a bar it is not called on keeps the chart's own background, which is Pine's na.

The colour carries its own alpha, so Pine's transp is color.withTransp(color.red, 90). Two calls on one bar do not composite — the last one wins — so a script layering zones should decide the colour itself and call once.

pane names a sub-pane to shade, "" the price pane, exactly as in plotPane.

Parameters​

color​

i32

pane?​

string = ""

Returns​

void