scale_color_dubois_d <- function(palette = "default", reverse = FALSE, ...) {
if (!palette %in% c("default", "dark", "light")) stop('Palette should be "default", "dark" or "light".')
pal <- dubois_pal_d(palette = palette, reverse = reverse)
ggplot2::discrete_scale("colour", paste0("dubois_", palette), palette = pal, ...)
}
scale_fill_dubois_d <- function(palette = "default", reverse = FALSE, ...) {
if (!palette %in% c("default", "dark", "light")) stop('Palette should be "default", "dark" or "light".')
pal <- dubois_pal_d(palette = palette, reverse = reverse)
ggplot2::discrete_scale("fill", paste0("dubois_", palette), palette = pal, ...)
}