R/duke_pal.R

Defines functions duke_pal

Documented in duke_pal

#' Duke Color Palette (Discrete) and Scales
#'
#' An eight-color colorblind friendly qualitative discrete palette that is
#' based on colors on the Duke branding guidelines.
#'
#' @references https://brand.duke.edu/colors/
#' @return Character vector of Duke palette HEX codes.
#' @export
#'
#' @examples
#' duke_pal()
duke_pal <- function() {
  values <- c(
    "#012169", "#C84E00", "#00539B", "#339898", "#A1B70D", "#E89923",
    "#FFD960", "#262626"
  )
  f <- scales::manual_pal(values)
  attr(f, "max_n") <- length(values)
  f
}

Try the duke package in your browser

Any scripts or data that you put into this service are public.

duke documentation built on May 29, 2024, 10:39 a.m.