Way to change the background color of code chunk in an R notebook

I'm not a big fan of the grey background colour of code chunks in markdown. is there a way to change or remove this?

Screenshot from 2017-10-11 11-15-55

That would likely require customizing themes, which isn't currently supported. There was a previous thread on that a little while back:

Any chance anyone can help me with this!?

Unfortunately, such a feature has not been implemented. Would you mind filing a feature request at http://github.com/rstudio/rstudio/issues?

is it implemented yet???

Here is the issue filed for the RStudio IDE:

When the feature has been implemented, the issue/feature request will be closed.

1 Like

Thanx @mara I will follow it.

In the meantime, if you are rendering to HTML (although it looks like the OP is writing to LaTeX), you can link a CSS file, or just embed HTML code.
An ugly hack perhaps, but adding the line

<style> *{background-color: #FFF !important;}</style>

at the beginning of the Rmd document will override the default settings.

I'm pretty sure this can be done now in RStudio 1.2 by modifying an .rstheme document and then adding that custom theme via Preferences -> Appearance.

However, my question is, in the .rstheme document, what is the value that controls the background color of the code chunks? I can figure this out! Someone out there knows the answer...

Have you seen the Creating Custom Themes guide? Based on that, I think the answer is:

Selector Scope Description
.ace_support.ace_function support.function Changes the color and style of code blocks in RMarkdown documents.