Use these functions to automatically create a consistent color palette for your slides, based around a single color.
mono_light()
A light theme based around a single color.
demo_function_call <- function(f, n_params = 1) {
cat(sep = "",
"```r\n",
paste(substitute(f)), "(",
if (n_params > 0) paste(collapse = ", ",
sapply(1:n_params, function(i) {
paste0(names(formals(f))[i], ' = "', formals(f)[[i]], '"')})),
")\n```"
)
}
demo_function_call(mono_light, 1)## ```r
## mono_light(base_color = "#23395b")
## ```

mono_dark()
A dark theme based around a single color.
## ```r
## mono_dark(base_color = "#cbf7ed")
## ```

mono_accent()
The default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.).
## ```r
## mono_accent(base_color = "#43418A")
## ```

mono_accent_inverse()
An “inverted” default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.).
## ```r
## mono_accent_inverse(base_color = "#3C989E")
## ```

These themes build from two (ideally) complementary colors.
duo()
A two-colored theme based on a primary and secondary color.
## ```r
## duo(primary_color = "#1F4257", secondary_color = "#F97B64")
## ```

duo_accent()
The default Xaringan theme with two accent colors.
## ```r
## duo_accent(primary_color = "#006747", secondary_color = "#CFC493")
## ```

duo_accent_inverse()
An “inverted” default Xaringan theme with two accent colors.
## ```r
## duo_accent_inverse(primary_color = "#006747", secondary_color = "#CFC493")
## ```

There are also two themes based around the solarized color palette, solarized_light() and solarized_dark(). For both themes, it is advisted to change the syntax highlighting theme to solarized-light or solarized-dark (looks great paired or constrasted).
solarized_dark()
## ```r
## solarized_dark()
## ```

To do this, your YAML header should look more-or-less like this: