Modify / get the default colors of the workbook.
Usage
wb_set_base_colors(wb, theme = "Office", ...)
wb_get_base_colors(wb, xml = FALSE, plot = TRUE)Details
Theme must be any of the following: "Aspect", "Blue", "Blue II", "Blue Green", "Blue Warm", "Greyscale", "Green", "Green Yellow", "Marquee", "Median", "Office", "Office 2007 - 2010", "Office 2013 - 2022", "Orange", "Orange Red", "Paper", "Red", "Red Orange", "Red Violet", "Slipstream", "Violet", "Violet II", "Yellow", "Yellow Orange"
See also
Other workbook styling functions:
base_font-wb,
wb_add_dxfs_style(),
wb_add_style()
Other workbook wrappers:
base_font-wb,
col_widths-wb,
creators-wb,
grouping-wb,
row_heights-wb,
wb_add_chartsheet(),
wb_add_data(),
wb_add_data_table(),
wb_add_formula(),
wb_add_hyperlink(),
wb_add_pivot_table(),
wb_add_slicer(),
wb_add_worksheet(),
wb_clone_worksheet(),
wb_copy_cells(),
wb_freeze_pane(),
wb_merge_cells(),
wb_save(),
wb_set_last_modified_by(),
wb_workbook()
Examples
wb <- wb_workbook()
wb$get_base_colors()
#> $Office
#> a:dk1 a:lt1 a:dk2 a:lt2 a:accent1 a:accent2 a:accent3
#> "#000000" "#FFFFFF" "#0E2841" "#E8E8E8" "#156082" "#E97132" "#196B24"
#> a:accent4 a:accent5 a:accent6 a:hlink a:folHlink
#> "#0F9ED5" "#A02B93" "#4EA72E" "#467886" "#96607D"
#>
wb$set_base_colors(theme = 3)
wb$set_base_colors(theme = "Violet II")
wb$get_base_colours()
#> $`Violet II`
#> a:dk1 a:lt1 a:dk2 a:lt2 a:accent1 a:accent2 a:accent3
#> "#000000" "#FFFFFF" "#632E62" "#EAE5EB" "#92278F" "#9B57D3" "#755DD9"
#> a:accent4 a:accent5 a:accent6 a:hlink a:folHlink
#> "#665EB8" "#45A5ED" "#5982DB" "#0066FF" "#666699"
#>
