Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you change the background colour in Grafana?

Tags:

grafana

I want to modify the dark theme in Grafana so that it uses #000000 as the background colour.

I have seen "How to change default black color of Grafana", however those answers only tell you how to choose between the light and the dark themes.

I also see that How to Customize Your Grafana Theme recommends editing the _variables.dark.scss file, however I cannot see where this is located, as it is not in the public/sass directory as the post suggests.

Finally, I also see that _variables.dark.generated.scss tells you to Edit grafana-ui/src/themes/_variables.dark.scss.tmpl.ts to update template, however I cannot find that file either.

Could you point me in the right direction, please?

like image 342
James Geddes Avatar asked Dec 07 '25 05:12

James Geddes


1 Answers

Boom Theme plugin worked for me with Grafana 6.7.1

Installation:

grafana-cli plugins install yesoreyeram-boomtheme-panel
service grafana-server restart

Go to certain Dashboard and add new Panel. Select "Boom Plugin".

Enter this under "Custom Style / CSS Override"

.panel-container {
  background-color: #000000; 
}
.dashboard-container {
  background-color: #000000; 
}
.navbar {
  background-color: #000000;
}

The Boom Theme plugin documentation is here: https://github.com/yesoreyeram/yesoreyeram-boomtheme-panel/tree/master/docs Documentation no longer exists, see the GitHub readme file instead.

P.S. In case you are embedding Grafana's dashboard/panel, check for "allow_embedding = true" under "[security]" section in grafana.ini and use &kiosk parameter in a URL to avoid menus

like image 161
kstka Avatar answered Dec 10 '25 12:12

kstka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!