Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Background Color in Rstudio

Tags:

rstudio

Is it possible to change the background colors in Rstudio? I know it's possible to change the theme of the editor, which is a really nice feature and which I'm already using, but is it possible to change the background color of the other windows (Environment, History, Files, etc...) to something else than white and the text to something darker? Backgrounds that are too light give me a headache.

like image 544
tarikki Avatar asked Sep 02 '14 13:09

tarikki


3 Answers

It isn't, but if you're running Linux, you can have the window manager invert the color of just one window. Target this to the RStudio window and you'll get RStudio with an inverse theme. (This was a common trick employed with Eclipse until it got a dark theme with the release of Eclipse Luna.)

https://askubuntu.com/questions/134668/how-to-trigger-a-color-inversion-effect-for-one-window

like image 89
Jonathan Avatar answered Nov 09 '22 14:11

Jonathan


Edit:

Hi all

since this is work in progress and i don't want to update this post all the time i moved the project to GitHub. Fell free to download the files from there.

The issues with dropdown menu, autocomplete and popups are solved in the latest Version on GitHub. Still newer builds than version 1.0.143 are not supported. But i will work on it.


Edit (05.05.2017): My custom_style.css works with the actual stable Version of RStudio 1.0.143 . Newer Preview and Daily Builds got already an upgrade where you can choose out of 3 different Themes. My files don't work with these newer builds at the moment, but I am working on it. Cause only one of these themes is kind of a dark metal blue but not the dark them i want to have. I will upload it as soon as it works.

I tested my theme yesterday on a Lubuntu 17.04 OS. Here are the Install instructions for Linux: Enter your installation folder for rstudio

cd /usr/lib/rstudio

Copy the Dark Theme folder you downloaded to the rstudio install dir

sudo cp -avrf /home/<user>/Downloads/RStudioDarkStyle ./

First save the Original files to a new folder (vanilla) if something goes wrong

sudo mkdir vanilla
sudo cp -avrf ./www/index.htm                   ./vanilla/index.htm
sudo cp -avrf ./resources/R.css                 ./vanilla/R.css
sudo cp -avrf ./resources/grid/gridstyles.css   ./vanilla/gridstyles.css 

If you set own styles before you can also save them if u don't have this may result in an error.

sudo cp -avrf ./www/custom_styles.css           ./vanilla/custom_styles.css

Then we replace the original files with the new ones

sudo cp -avrf ./RStudioDarkStyle/index.htm          ./www/index.htm 
sudo cp -avrf ./RStudioDarkStyle/custom_styles.css  ./www/custom_styles.css 
sudo cp -avrf ./RStudioDarkStyle/R.css              ./resources/R.css 
sudo cp -avrf ./RStudioDarkStyle/gridstyles.css     ./resources/grid/gridstyles.css

And thats all it should work now.


I found this guide how to make rstudio dark by zencoder on rstudio support

and improved it a little bit.

R-Studio-Dark

I edited the custom_styles.css and the gridstyles.css the other files are original as zencoder wrote them.

For Installation guide see the readme file. I use the "Vibrant Ink" Apperance with it on a Win7 pc.

I didn't even try to change the plot window, because most graphics are used in papers and such and are normaly printed with a white background, for me it is more functional to have a white background for plots.

Have fun with this hope it helps.

DdS

like image 5
Swolf Avatar answered Nov 09 '22 15:11

Swolf


It's simple now.

Tools > Options > Appearance  

Choose color.

That's it.

like image 3
Reiji Avatar answered Nov 09 '22 14:11

Reiji