Skip to content

Commit 7916f48

Browse files
gordonwoodhullgithub-actions[bot]
authored andcommitted
Theme Helpers
(cherry picked from commit 9f73035)
1 parent 3d75b5a commit 7916f48

File tree

1 file changed

+8
-0
lines changed
  • docs/blog/posts/2025-xx-xx-R-package-release-1.5

1 file changed

+8
-0
lines changed

docs/blog/posts/2025-xx-xx-R-package-release-1.5/index.qmd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ data.frame(
117117

118118
These helper functions wrap content in HTML spans with `data-qmd-base64` attributes that Quarto recognizes for Markdown processing. They work with any table package that supports raw HTML (knitr, kableExtra, DT). For content that only works in Quarto, use the `display` argument for graceful fallback. See more examples in the [Markdown in HTML tables vignette](https://quarto-dev.github.io/quarto-r/articles/markdown-html-tables.html), including comparisons of Markdown support in HTML tables across different packages.
119119

120+
## Apply Light and Dark Themes to Plots and Tables
121+
122+
The `theme_colors_flextable()`, `theme_colors_ggplot2()`, `theme_colors_gt()`, `theme_colors_plotly()`, `theme_colors_thematic()` helper functions change the background and foreground colors of six popular plot and table packages. These can be used to produce light and dark [`renderings`](https://quarto.org/docs/computations/execution-options.html#cell-renderings) to match the plot or table with themes in dark mode.
123+
124+
The usage of the the results of these functions depends on the package. See the [Theme Helpers](https://quarto-dev.github.io/quarto-r/articles/theme-helpers.html) article for usage examples of `theme_colors_*`.
125+
126+
The `theme_brand_flextable()`, `theme_brand_ggplot2()`, `theme_brand_gt()`, `theme_brand_plotly()`, `theme_brand_thematic()` helper functions change the background and foreground colors of these packages using corresponding [brand.yml](https://posit-dev.github.io/brand-yml/) colors. See the [Light & Dark Renderings Examples](https://examples.quarto.pub/lightdark-renderings-examples/ggplot2.html) for usage examples of `theme_brand_*`.
127+
120128
## Work with R Scripts and Quarto {#work-with-r-scripts}
121129

122130
### Extract R Code from Quarto Documents

0 commit comments

Comments
 (0)