gadenbuie / xaringanthemer

😎 Give your xaringan slides some style
https://pkg.garrickadenbuie.com/xaringanthemer/
Other
445 stars 28 forks source link

Remove names from color vectors before modifying #62

Closed gadenbuie closed 2 years ago

gadenbuie commented 3 years ago
library(xaringanthemer)

palette <- c(
  primary = "#1381B0",  # Blue
  secondary = "#FF961C" # Yellow/orange
)

style_duo_accent(
  outfile = NULL,
  primary_color = palette["primary"],
  secondary_color = palette["secondary"],
  inverse_header_color = "#FFFFFF"
)
#> Error: Color names in `colors` must be valid CSS classes

happens because primary.primary and secondary.secondary are names in the color vector and fails checks that they'll be valid CSS.