R/color_palettes.R

#' Color palette proposed by Okabe and Ito & UC
#'
#' Two color palettes taken from the article "Color Universal Design" by
#' Okabe and Ito.
#' The variant \code{palette_OkabeIto} contains a gray color, while \code{palette_OkabeIto_black} contains black instead.
#' \code{palette_OkabeIto_light} contains a lightened version of the \code{palette_OkabeIto} colors.
#' Note: To extract hex colors, convert palette using \code{as.vector}.
#' @return A named character vector of hexadecimal color values. The exported
#'   objects provide the standard, black-substituted, and lightened Okabe-Ito
#'   variants, respectively.
#' @family palettes
#' @export
#'
palette_OkabeIto <- c("orange"         = "#E69F00",
                      "sky blue"       = "#56B4E9",
                      "bluish green"   = "#009E73",
                      "yellow"         = "#F0E442",
                      "blue"           = "#0072B2",
                      "vermilion"      = "#D55E00",
                      "reddish purple" = "#CC79A7",
                      "dark gray"      = "#999999"
)

#' @rdname palette_OkabeIto
#' @export

palette_OkabeIto_black <- c("orange"         = "#E69F00",
                            "sky blue"       = "#56B4E9",
                            "bluish green"   = "#009E73",
                            "yellow"         = "#F0E442",
                            "blue"           = "#0072B2",
                            "vermilion"      = "#D55E00",
                            "reddish purple" = "#CC79A7",
                            "black"          = "#000000"
)

#' @rdname palette_OkabeIto
#' @export

palette_OkabeIto_light <- colorspace::lighten(palette_OkabeIto, 0.50)
names(palette_OkabeIto_light) <- names(palette_OkabeIto)

#' UC Color Palette
#'
#' Official University of Cincinnati brand colors.
#'
#' The palette combines the current primary colors from UC's visual identity
#' system with the expanded palette recommended for data visualization.
#' Canonical brand names are included alongside a small set of legacy aliases
#' used by earlier versions of this package.
#' Note: To extract hex colors, convert palette using \code{as.vector}.
#' @return A named character vector of hexadecimal University of Cincinnati
#'   brand colors.
#' @family palettes
#' @rdname palette_UC
#' @export

palette_UC <- c(
  .uc_brand_colors,
  "black" = .uc_color("Black"),
  "white" = .uc_color("White"),
  "gray" = .uc_color("Grey"),
  "grey" = .uc_color("Grey"),
  "dark gray" = .uc_color("Bearcats Black"),
  "Vivid red" = .uc_color("UC Red")
)

Try the Rbearcat package in your browser

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

Rbearcat documentation built on March 21, 2026, 5:07 p.m.