R/get_gradient.R

Defines functions get_gradient

get_gradient <- function(themr, named = TRUE) {
  if (!is_ggthemr(themr))
    stop('themr is not a ggthemr object.', call. = FALSE)
  gradient <- themr$palette$object$gradient
  if (!named) gradient <- unname(gradient)
  return (gradient)
}
cttobin/ggthemr documentation built on April 19, 2022, 3:31 a.m.