Changing invisible (white font) output in RStudio theme `Cobalt`

Viewed 582

I'm using R Studio's Cobalt theme, and I have found one case where in-line output in Rmd files is invisible (i.e. font is white on a white background). I would like to edit that font colour to anything visible.

Reproducible example below:

  • First set Editor Theme to Cobalt:

enter image description here

Then, a simple example of using str_view() from Hadley's R4DS, in an Rmd file:

x <- c("apple", "banana", "pear")
stringr::str_view(x, "an")

The output will render to visible HTML no problem, and the Viewer window also shows visible output:

enter image description here

But when if you run it as an in-line chunk (i.e. how a lot of my debugging takes place), we get some of the output as a white font on white background:

enter image description here

How can I edit that font colour for that particular output, so that it is visible?

I have already tried editing Cobalt here: https://tmtheme-editor.herokuapp.com/#!/editor/theme/Cobalt

Following the advice from here: https://towardsdatascience.com/customize-your-rstudio-theme-914cca8b04b1

2 Answers

Maybe it's late but i've a solution with same problem.You need to change foreground color of your preferred theme(or change html background)

Here is you can edit your preferred theme : https://tmtheme-editor.herokuapp.com

As you wrote upward,in most of dark themes foregrounds are whitish . Where you can edit in general tab .You should choose a bit darker foreground (for ex:#BEC0C2).enter image description here

or

i couldn't find how to change html background in Cobalt theme but some other (ex: Material) theme allow us to change colors of popup Cssenter image description here

Sorry for my photo edits :D Hopefully it will work ...

For anyone looking at this question, I've tried a lot of things, and honestly the easiest answer was to move the output of chunks out of the inline document, and move it to the console. Everything works after that:

enter image description here

Related