ThemeSwitcher enables R Studio users to quickly switch between a light and a dark theme of their preference through the R Studio addins functionality.
Demo:
Once the ThemeSwitcher package is installed, functionality is added automatically to the R Studio addins dropdown. No need to include library(ThemeSwitcher)
in your R scripts.
# install.packages("devtools")
devtools::install_github("bkam235/ThemeSwitcher")
ThemeSwitcher provides 2 function to set custom theme preferences:
ThemeSwitcher::set_light_theme(theme = "TextMate")
: sets the light theme that the addin function "Light Theme" applies. Default is "TextMate" (R Studio default theme).ThemeSwitcher::set_dark_theme(theme = "Material")
: sets the light theme that the addin function "Dark Theme" applies. Default is "Material".Both functions expect valid theme name as theme parameter. Valid theme names and their appearance can be found in R Studio under Tools/Global Options/Appearance/Editor Themes.
As of R Studio 1.1.383, valid theme names are:
R Studio >= 0.99.878 (addins support)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.