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:
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:
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:
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
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).
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 Css
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:
Related
I use the theme Solarized Dark on RStudio. I'm writing lecture notes using RMarkdown/bookdown. I like it in general, but there is one issue I have with it:
it colours all quotes, overriding most of the other colours.
Hopefully the following picture illustrates this.
I am writing maths lecture notes, so I use $...$ a lot. It's annoying to have it all the same colour, with only the emphasised text or footnotes standing out.
Can I customise the theme so that writing > doesn't make this switch?
Eg, in VSCode, the > is coloured green, but then nothing after it is coloured.
I've had a look at customising the themes, but haven't found how to do this. I can change the colour, or even delete the colour for string, but then everything is the plain white colour, including stuff between $...$. I want > not to overwrite the other highlighting.
An alternative solution, which I'd be very happy with would be to define some wrapper to make this go in a quote. The LaTeX equivalent would be the following.
This last part seems like much more of a big deal, but would be helpful as I wouldn't have to keep writing > for multi-line quotes.
I have found other posts showing how to change the font size of only the Help panel, and I know how to Zoom In and Out via keyboard shortcuts, or by using the long way.
I also know that you can change the font size of the editor in the Appearances option.
However, I would like to reduce the font size of only the console panel.
I would like to keep my editor font nice and big, but the console one is mostly for checking out quick data.frames so the smaller the better.
I tried fiddling around the source code of Rstudio to no avail.
Thank you in advance!
I made a markdown in html, using kable on a dataframe. I set a background color, it works on the browser, but when i want to print paper, the color disappear... I would like to do a layout too (page break, jump line), i searched, i saw some code, i tested, but nothing works...
The code for color :
kable(tableEvo,"html",
booktabs=T,
caption=paste("Fonds et Benchmarks respectifs au",format(ajd,"%d-%m-%Y"),sep(" "))%>%
kable_styling("basic","condensed")%>%
row_spec(c(2,4,6,8,10,12,14,16,18,20,22,24,26),background="#33FFFF")%>%
column_spec(1:5,bold=TRUE)
This is actually bootstrap's fault. It will take away all your background color when print.
See Bootstrap print CSS removes background color
I will try to open up the webpage in Safari and check "print background" on the printing page.
The simple solution is to put !important behind the color name in the code.
For instance if the background color chosen is red, write:
background = "red !important"
This worked for me.
Thanks to Hao, for clarifying this for me over e-mail.
I recently discovered oh-my-zsh and want to use a custom skin.
I found a good one (crunch) and want to change just one thing. Unfortunately I can't find any documentation about how to write a theme.
I am looking for a way to change the background color only of the line I enter my command into. Kind of like here:
I even found the code for the picture.
How can I change the background color in this one single line?
I'm trying to make this zsh theme work: https://gist.github.com/3712874
I've made some small changes to it but there is still one problem. It seems that the right triangle glyph doesn't get the same color as the text background. See this image:
Any ideas why this might happen, and how to fix it?
I made it look pretty good. I had to go change the opacity of my colors. Instead of 100% I had to fiddle a bit and set them around 76-81% depending on what color it was.
I believe I switched to iTerm2 to fix this issue in the end.
Solution
On Linux using Terminal I had to change the Profile Preferences->Colors. For example, I wanted to use the theme dpoggi. I downloaded the theme image, then used the dropper tool to match the "red" "green", "cyan", and "magenta" that are used in the dpoggi source code.
dpoggi theme
Terminal Profile Preferences->Colors
I found that playing with the "Cursor guide" transparency in Preferences > Profiles worked for me. It can also be disabled.