In R markdown or R studio, for a line like this
library('tidyverse')
library
is colored in blue and tidyverse
in green. When I knit to html, they appear in dark red and red respectively. How can I knit my html keeping the original color for the whole document? In the R Markdown Cookbook, it says that I can use a span tag
and set the color, but that seems to work for a specific code chunk. I found this post for the background color, not the text. Or this one, but for single code chunks again. I believe it comes from the fact that colours have different names in R and HTML? Is there a way to specify this in the <style type="text/css">
section just below the YAML header? I code in R but I am totally new to CSS or HTML.