Open renkun-ken opened 8 years ago
Interesting. Hopefully, I will check it out in the morning.
It works fine with light RStudio theme like TextMate:
It appears RStudio is assigning a body
color which is impacting the table.
I'm not sure internally how RStudio assigns this color. We could add some code, but I think it would better handled on the RStudio end. I wonder what other htmlwidgets
might be affected. I'll keep on a dark theme to see what other issues show up.
When I choose a light theme as you suggest, the body is assigned color: rgb(0,0,0)
so black. I still have not found what code determines color
.
Indeed, RStudio hard-codes the background color as white
at the moment, but we should update / set this dynamically based on the theme / HTML widget specification. I'll log this on our internal tracker and try to get this cleaned up before the RStudio release.
I'm still having this problem! Dark mode is formatting my table font color to white.
I'm still having this problem! Dark mode is formatting my table font color to white.
Same here -- funny, after no posts in 4 years, two of us post in 18 minutes!
Ran into this issue too in a markdown doc and ended up here - I'm displaying it in the Viewer pane as a work around so I can see the table output without changing my theme (and without pushing all output to Viewer)😄
In case helpful for anyone else:
library(formattable)
library(htmltools)
mytable <- formattable(mtcars, list(mpg = color_tile("white", "lightpink")))
html_print(as.htmlwidget(mytable))
The issue is open on rstudio github. https://github.com/rstudio/rstudio/issues/6489
The latest RStudio Preview has supported R Notebook (enable by Global Options -> R Markdown -> Enable R notebook).
However, the color of text in a formattable htmlwidget is too light to see. For example,
@timelyportfolio, any idea on how to fix this?