palettes
Methods for Colour Vectors and Colour Palettes
By Michael McCarthy in R packages
October 14, 2022
palettes is an R package for working with colour vectors and colour palettes. There are three main goals to the palettes package, each described in a vignette:
-
To provide a new family of colour classes (
palettes_colour
andpalettes_palette
) that always print as hex codes with colour previews;vignette("palettes")
. -
To provide a comprehensive library of methods for working with colour vectors and colour palettes, including methods for ggplot2,
vignette("ggplot2")
; gt,vignette("gt")
; biscale,vignette("biscale")
; and other colour packages,vignette("compatibility")
. -
To make it easy for anyone to make their own colour palette package;
vignette("creating-packages")
. Colour palette packages made with palettes exist solely for the purpose of distributing colour palettes and get access to all the features of palettes for free.
Installation
Install palettes from CRAN with:
install.packages("palettes")
Install the development version from GitHub or R-universe with:
# Install from GitHub
# install.packages("remotes")
remotes::install_github("mccarthy-m-g/palettes")
# Install from R-universe
install.packages('palettes', repos = 'https://mccarthy-m-g.r-universe.dev')
Documentation
See at
https://mccarthy-m-g.github.io/palettes/
and also in the installed package: help(package = "palettes")
.
License
MIT © Michael McCarthy