jthomasmock / gtExtras

A Collection of Helper Functions for the gt Package.
https://jthomasmock.github.io/gtExtras/
Other
193 stars 26 forks source link

possible dark mode #3

Closed PythonCoderUnicorn closed 3 years ago

PythonCoderUnicorn commented 3 years ago

Hello gtExtras,

I just tried out your package and really like it, especially the NYT theme for data tables - very readable.

My query is that when I run the code, it opens Viewer tab in RStudio and gives me white background. I tried to use ggdark piped along with example code to see if that works but it doesn't.

head(mtcars) %>% gt() %>% gt_theme_nytimes() %>% tab_header(title = "New York Times theme datatable") %>% gt_highlight_rows(rows = 2, font_weight = "normal") %>% ggdark::dark_mode()

Error message: Error in ggdark::dark_mode(.) : is.theme(.theme) is not TRUE

📌

jthomasmock commented 3 years ago

Howdy, and thanks for trying it out! The gt_theme_zzz functions are all intended to be used as is, ie faithfully representing the style of the respective sources which have white or gray backgrounds.

I'll keep this open as a request for a new gt_theme_dark() with a dark background but do not plan on making dark-mode alternatives for the existing named gt_themes. Thanks!