问题
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?
回答1:
I found the same sites as you and was frustrated at first. Fortunately I then found the Grafana plugin "Boom Theme Panel" (https://grafana.com/grafana/plugins/yesoreyeram-boomtheme-panel).
It allows you to define a background image or to override the background color under "Custom Style / CSS Override" with the following settings:
.main-view {
background-color: #000000;
}
来源:https://stackoverflow.com/questions/59088594/how-do-you-change-the-background-colour-in-grafana