% Generated by roxygen2: do not edit by hand % Please edit documentation in R/colors.R \name{civilytics_palette} \alias{civilytics_palette} \title{Get colors from a Civilytics palette} \usage{ civilytics_palette(name = "qual", n = NULL, reverse = FALSE) } \arguments{ \item{name}{Character. Palette name. See `names(civilytics_palettes)`.} \item{n}{Integer or `NULL`. Number of colors to return. If `NULL`, returns all defined stops.} \item{reverse}{Logical. Reverse the palette order. Default `FALSE`.} } \value{ A character vector of hex color codes. } \description{ Returns a character vector of hex codes from a named Civilytics palette. For qualitative palettes, colors beyond the palette length recycle with a warning. For sequential and diverging palettes, colors are interpolated via [grDevices::colorRampPalette()]. } \examples{ civilytics_palette() # all 7 qualitative colors civilytics_palette("seq_navy", n = 5) # 5-stop navy ramp civilytics_palette("div_navy_ember", n = 11, reverse = TRUE) }