Any way to change colors in Rstudio to something other than default options?

后端 未结 6 501
隐瞒了意图╮
隐瞒了意图╮ 2021-01-30 11:46

Is there anyway to change the color schemes for Rstudio? It comes with 6 or 7 default, pre-packaged

6条回答
  •  野性不改
    2021-01-30 12:24

    Not able to add a comment. Having read all the replies and comments, and tried a few things seems interesting. Here is what works for me.

    I am using RStudio 1.0.136. According to all the posts, right click on the Editor -> Inspect. The Web Inspector comes up and shows the Elements tab. Then click the Sources tab, select "Only enable for this session", click "Enable Debugging" button. You will see the code for the theme xxxxxxx.cache.css file. If nothing in the editor, try the left top "Show Navigator" button right under the "Elements" menu. Select the .css file in the list and it should open.

    My line number seems dim. So changed color: #222; to color: #818222; in this section: (forgive my bad color sense). And you can see the color change right away! How amazing!

    .ace_gutter {
      background-color: #3d3d3d;
      background-image: -moz-linear-gradient(left, #3D3D3D, #333);
      background-image: -ms-linear-gradient(left, #3D3D3D, #333);
      background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#3D3D3D), to(#333));
      background-image: -webkit-linear-gradient(left, #3D3D3D, #333);
      background-image: -o-linear-gradient(left, #3D3D3D, #333);
      background-image: linear-gradient(left, #3D3D3D, #333);
      background-repeat: repeat-x;
      border-right: 1px solid #4d4d4d;
      text-shadow: 0px 1px 1px #4d4d4d;
      color: #818222;
    }
    

    @skan mentioned selected words are too dim. I have the same problem. So here I found it:

    .ace_marker-layer .ace_selected-word {
      border-radius: 4px;
      border: 8px solid #ff475d;
      box-shadow: 0 0 4px black;
    }
    

    I changed border: 8px solid #ff475d;. It is now very bright, or may be too bright. Anyway, it works. Thanks for every one. And hope this can help.

    This is for current session only. Now you know which .css to modify and what you should do, it will be easy to modify the original .css file to keep it permanent.

提交回复
热议问题