File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ Suggests:
3636 plotly,
3737 rsconnect (>= 0.8.26),
3838 testthat (>= 3.1.7),
39+ thematic,
3940 withr,
4041 xfun
4142VignetteBuilder:
Original file line number Diff line number Diff line change @@ -132,3 +132,33 @@ plotly_theme_brand <- function(brand_yml) {
132132 brand <- yaml :: yaml.load_file(brand_yml )
133133 plotly_theme_colors(brand $ color $ background , brand $ color $ foreground )
134134}
135+
136+
137+ # ' Create a thematic theme using background and foreground colors
138+ # '
139+ # ' Create a thematic theme that uses the specified background and
140+ # ' foreground colors.
141+ # '
142+ # ' @param bg The background color
143+ # ' @param fg The foreground color
144+ # '
145+ # ' @export
146+ thematic_theme_colors <- function (bg , fg ) {
147+ (function () {
148+ thematic :: thematic_rmd(
149+ bg = bg ,
150+ fg = fg ,
151+ )})
152+ }
153+
154+ # ' Create a thematic theme from a brand.yml file
155+ # '
156+ # ' Create a thematic theme that uses colors from the brand file.
157+ # '
158+ # ' @param brand_yml The path to the brand.yml file
159+ # '
160+ # ' @export
161+ thematic_theme_brand <- function (brand_yml ) {
162+ brand <- yaml :: yaml.load_file(brand_yml )
163+ thematic_theme_colors(brand $ color $ background , brand $ color $ foreground )
164+ }
You can’t perform that action at this time.
0 commit comments