Editing Rstudio themes

Author

Galen Holt

The issue

I really don’t like how faint the selection colours are for all of the dark themes. When I do a ‘find’, I don’t want to hunt around for dark grey on black. So to fix that, I need to edit the theme.

Creating a new theme

I went to this massive list of themes, clicked ‘gallery’, chose the one I wanted (just a simple edit of Tomorrow Night, will save a more complex hunt for another day). Then the pane in the middle lets us change all the colours. I clicked the ‘General’ tab, and changed the lineHighlight and selection to a nice blue. I also changed the comment colour to green, not sure if I like that or not.

Then, go to the ‘Info’ tab and change the name before downloading. Otherwise Rstudio won’t find it under a new name.

Download. This saves as a .tmTheme file, which I think might just be able to be used directly (see new Posit documentation, but I was looking at something old and so used rstudioapi::convertTheme('setup/Tomorrow Night HL.tmTheme', outputLocation = 'setup') to create a .rstheme file.

Then global options, add, and select the theme. I had to restart Rstudio a couple times for it to take. The edited theme is available in the git for this website.