R/get_palette.R

Defines functions get_palette

Documented in get_palette

#' Retrieve one of the built-in color palettes
#'
#' This function retrieves a color palette from the built-in palettes. To
#' see the available palettes, use [list_palettes()].
#'
#' @param palette A character string specifying the name of the color palette to
#'
#' @return A character vector of colors in hex format.
#'
#' @seealso [list_palettes()]
#'
#' @examples
#' get_palette("Vermeer:LittleStreet")
#'
#' @export
get_palette <- function(palette = "ColorBrewer:Accent") {
  get_palette_cpp(palette)
}

Try the qualpalr package in your browser

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

qualpalr documentation built on Aug. 19, 2025, 1:14 a.m.