77# ' @param fg The foreground color
88# '
99# ' @export
10- flextable_theme_colors <- function (bg , fg ) {
10+ theme_colors_flextable <- function (bg , fg ) {
1111 (function (x ) {
1212 if (! inherits(x , " flextable" )) {
13- stop(" flextable_theme_colors only supports flextable objects." )
13+ stop(" theme_colors_flextable only supports flextable objects." )
1414 }
1515 x <- flextable :: bg(x , bg = bg , part = " all" )
1616 x <- flextable :: color(x , color = fg , part = " all" )
@@ -25,9 +25,9 @@ flextable_theme_colors <- function(bg, fg) {
2525# ' @param brand_yml The path to the brand.yml file
2626# '
2727# ' @export
28- flextable_theme_brand <- function (brand_yml ) {
28+ theme_brand_flextable <- function (brand_yml ) {
2929 brand <- yaml :: yaml.load_file(brand_yml )
30- flextable_theme_colors (brand $ color $ background , brand $ color $ foreground )
30+ theme_colors_flextable (brand $ color $ background , brand $ color $ foreground )
3131}
3232
3333
@@ -40,7 +40,7 @@ flextable_theme_brand <- function(brand_yml) {
4040# ' @param fg The foreground color
4141# '
4242# ' @export
43- ggplot_theme_colors <- function (bg , fg ) {
43+ theme_colors_ggplot <- function (bg , fg ) {
4444 if (! requireNamespace(" ggplot2" , quietly = TRUE )) {
4545 return (NULL )
4646 }
@@ -67,9 +67,9 @@ ggplot_theme_colors <- function(bg, fg) {
6767# ' @param brand_yml The path to the brand.yml file
6868# '
6969# ' @export
70- ggplot_theme_brand <- function (brand_yml ) {
70+ theme_brand_ggplot <- function (brand_yml ) {
7171 brand <- yaml :: yaml.load_file(brand_yml )
72- ggplot_theme_colors (brand $ color $ background , brand $ color $ foreground )
72+ theme_colors_ggplot (brand $ color $ background , brand $ color $ foreground )
7373}
7474
7575
@@ -81,8 +81,8 @@ ggplot_theme_brand <- function(brand_yml) {
8181# ' @param bg The background color
8282# ' @param fg The foreground color
8383# '
84- # ' @export
85- gt_theme_colors <- function (bg , fg ) {
84+ # ' @theme_colors_export
85+ gt <- function (bg , fg ) {
8686 (function (table ) {
8787 table | >
8888 gt :: tab_options(
@@ -98,9 +98,9 @@ gt_theme_colors <- function(bg, fg) {
9898# ' @param brand_yml The path to the brand.yml file
9999# '
100100# ' @export
101- gt_theme_brand <- function (brand_yml ) {
101+ theme_brand_gt <- function (brand_yml ) {
102102 brand <- yaml :: yaml.load_file(brand_yml )
103- gt_theme_colors (brand $ color $ background , brand $ color $ foreground )
103+ gt (brand $ color $ background , brand $ color $ foreground )
104104}
105105
106106# ' Create a plotly theme using background and foreground colors
@@ -112,7 +112,7 @@ gt_theme_brand <- function(brand_yml) {
112112# ' @param fg The foreground color
113113# '
114114# ' @export
115- plotly_theme_colors <- function (bg , fg ) {
115+ theme_colors_plotly <- function (bg , fg ) {
116116 (function (plot ) {
117117 plot | > plotly :: layout(paper_bgcolor = bg ,
118118 plot_bgcolor = bg ,
@@ -128,9 +128,9 @@ plotly_theme_colors <- function(bg, fg) {
128128# ' @param brand_yml The path to the brand.yml file
129129# '
130130# ' @export
131- plotly_theme_brand <- function (brand_yml ) {
131+ theme_brand_plotly <- function (brand_yml ) {
132132 brand <- yaml :: yaml.load_file(brand_yml )
133- plotly_theme_colors (brand $ color $ background , brand $ color $ foreground )
133+ theme_colors_plotly (brand $ color $ background , brand $ color $ foreground )
134134}
135135
136136
@@ -143,7 +143,7 @@ plotly_theme_brand <- function(brand_yml) {
143143# ' @param fg The foreground color
144144# '
145145# ' @export
146- thematic_theme_colors <- function (bg , fg ) {
146+ theme_colors_thematic <- function (bg , fg ) {
147147 (function () {
148148 thematic :: thematic_rmd(
149149 bg = bg ,
@@ -158,7 +158,7 @@ thematic_theme_colors <- function(bg, fg) {
158158# ' @param brand_yml The path to the brand.yml file
159159# '
160160# ' @export
161- thematic_theme_brand <- function (brand_yml ) {
161+ theme_brand_thematic <- function (brand_yml ) {
162162 brand <- yaml :: yaml.load_file(brand_yml )
163- thematic_theme_colors (brand $ color $ background , brand $ color $ foreground )
163+ theme_colors_thematic (brand $ color $ background , brand $ color $ foreground )
164164}
0 commit comments