Files
civilyticsR/man/civilytics_palette.Rd
T
jared 515bae8685
R-CMD-check / R CMD check (push) Successful in 3m41s
feat: expand color system to 53 colors/10 palettes, add grid/slide themes, and README gallery
Replace the 16-color / 3-palette system with the full Civilytics design
system: 53 named colors (full navy, ember, violet ramps plus teal, plum,
moss, brass supporting hues) and 10 visualization palettes (qual,
qual_warm, qual_cool, seq_ember, seq_navy, seq_violet, seq_paper_ink,
div_navy_ember, div_violet_ember).

Enrich theme_civilytics() with grid and paper_bg parameters, add
theme_civilytics_slide() for presentations, and load all four brand fonts
(Inter, Libre Franklin, Source Serif 4, JetBrains Mono).

Add README.Rmd with rendered gallery showing all palettes, theme
variants, grid options, dark/slide modes, facets, and scale usage.
2026-05-19 10:35:32 -06:00

31 lines
1.0 KiB
R

% 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)
}