The colours that are available in TradingView can be used in different ways. But what options do we have for colouring the chart’s background?

In this article:

Colouring a section or the full background in TradingView

The background of a TradingView chart can be coloured with a basic TradingView colour or a hexadecimal colour value that makes millions of colours possible. Regardless of the colour, there are two ways in which we can colour the chart’s background.

The first approach is to colour a price bar’s background from top to bottom (see Pine Script Language Tutorial, n.d.). This coloured area can either be the background of the chart’s main instrument or that of a subchart, depending on where our script displays. While this feature can colour the background of all bars, it’s typically used to highlight certain situations (like an uptrend) or to colour the background of specific bars (such as a buy or sell signal).

For example, here the background is coloured red or green depending on the general trend while RSI signals are highlighted with a more pronounced coloured background:

Colouring the background of a TradingView chart programmatically

The other way in which we can apply colours to a chart is by colouring a background section (Pine Script Language Tutorial, n.d.; TradingView, n.d.). For this we first need to create two plots or two horizontal lines on the chart. Then we can colour the chart area that’s between these plots or lines. With this feature we can, for instance, highlight the area between support and resistance areas like this:

Colouring a section of the chart's background in TradingView

Now, let’s take a look at the TradingView tutorials that discuss these two different approaches.

Colouring the chart’s full background in TradingView

In this chapter on background colouring we begin by looking at colouring the chart’s full background from top to bottom. After discussing how we do that programmatically in TradingView Pine, we take a closer look at its application in the following articles:

Colouring a chart’s background section in TradingView Pine

In the second and last part of the background colouring chapter we look at colouring the background of a chart section that’s between two plots or two horizontal lines. After discussing that feature of TradingView Pine, we look at several applications:

We conclude the chapter with a summary of background colouring in TradingView where we reiterate the most important parts.


Pine Script Language Tutorial (n.d.). Retrieved on October 23, 2015, from

TradingView (n.d.). Script Language Reference Manual. Retrieved on January 15, 2016, from