Tie Themes to Graphs

There’s already a distinction between graph for keybindings so I suppose the mechanism is already there. Maybe there’s a way to do it already? I find it strange to have a distinction between keybindings (which is quite irritating) but not for themes (which, to me, makes much more sens).

Edit custom.css

It is possible to use custom CSS of the graph to override the current theme.

Pro:

  • Each graph can have its own custom CSS
  • You can use @import to get different plugin themes for different graph as explained here

Cons:

  • Not a friendly solution for people who don’t know CSS
  • The custom CSS will likely not be compatible with different theme (plugin theme)

How to do

  • Go to settings, (In general tab) Edit custom.css
  • Add to custom css:
    • Use the inspector (ctrl+i) to find the things you want to change and write them in custom.css
    • Import a custom theme at the top of custom.css
  • Do this for each graph you want to modify the theme

Example

For the Cappucin Latte, here’s how to change the background color:

:root {
  --ctp-primary-background-color: #85c6ff;
}

Where “#85c6ff” is an hexadecimal color and “–ctp-primary-background-color” a variable used in Catpuccin (so this will not work with another plugin theme).

1 Like