See pal_primer()
for details.
Arguments
- palette
Palette type. Currently there is one available option:
"mark17"
(17-color palette).- alpha
Transparency level, a real number in (0, 1]. See
alpha
ingrDevices::rgb()
for details.- ...
Additional parameters for
ggplot2::discrete_scale()
.
References
GitHub (2025). "Primer data visualization colors." https://primer.style/product/ui-patterns/data-visualization/
Author
Nan Xiao | me@nanx.me | https://nanx.me
Examples
example_scatterplot() + scale_color_primer()
#> `geom_smooth()` using formula = 'y ~ x'
example_barplot() + scale_fill_primer()