How can i change the background color

How do i change the background of the “page”/ blankspace around the plotly plots? i want to leave the plots the color they are. I want to change the color of the rest of the page?

Hi @notsolowki
Sorry for the late reply. I just saw this.

This is how to change the page background color. https://plotly.com/python/reference/layout/#layout-paper_bgcolor

fig.update_layout(paper_bgcolor="black")

You can also use hex color codes such as:

fig.update_layout(paper_bgcolor="#000000")
3 Likes

Also:

if you want to use RGB color codes, especially with transperancy, this works
fig.update_layout(paper_bgcolor="rgb(0,0,0,0)")

1 Like