feat: expand color system to 53 colors/10 palettes, add grid/slide themes, and README gallery
R-CMD-check / R CMD check (push) Successful in 3m41s
R-CMD-check / R CMD check (push) Successful in 3m41s
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.
This commit is contained in:
@@ -4,25 +4,23 @@
|
||||
\alias{scale_fill_civilytics}
|
||||
\title{Civilytics fill scale for ggplot2}
|
||||
\usage{
|
||||
scale_fill_civilytics(palette = "main", discrete = TRUE, ...)
|
||||
scale_fill_civilytics(palette = "qual", discrete = TRUE, reverse = FALSE, ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{palette}{Character. Palette name passed to [civilytics_pal()].
|
||||
Defaults to `"main"`.}
|
||||
\item{palette}{Character. Palette name. Defaults to `"qual"`.}
|
||||
|
||||
\item{discrete}{Logical. `TRUE` (default) for a discrete scale; `FALSE` for
|
||||
a continuous gradient via [ggplot2::scale_fill_gradientn()].}
|
||||
\item{discrete}{Logical. `TRUE` (default) for categorical data; `FALSE`
|
||||
for a continuous gradient via [ggplot2::scale_fill_gradientn()].}
|
||||
|
||||
\item{...}{Additional arguments passed to the underlying ggplot2 scale
|
||||
function.}
|
||||
\item{reverse}{Logical. Reverse the palette order. Default `FALSE`.}
|
||||
|
||||
\item{...}{Additional arguments passed to the ggplot2 scale function.}
|
||||
}
|
||||
\value{
|
||||
A ggplot2 scale object.
|
||||
}
|
||||
\description{
|
||||
Applies a Civilytics brand palette to the `fill` aesthetic. Use
|
||||
`discrete = TRUE` for categorical variables and `discrete = FALSE` for
|
||||
continuous gradients.
|
||||
Applies a Civilytics brand palette to the `fill` aesthetic.
|
||||
}
|
||||
\examples{
|
||||
library(ggplot2)
|
||||
@@ -32,5 +30,5 @@ ggplot(mpg, aes(class, fill = class)) +
|
||||
|
||||
ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
|
||||
geom_tile() +
|
||||
scale_fill_civilytics("sequential", discrete = FALSE)
|
||||
scale_fill_civilytics("seq_ember", discrete = FALSE)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user