Viewing Palettes"

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Install from CRAN using: ``` {r, eval = FALSE} install.packages("PrettyCols")

Or install the development version using:
``` {r, eval = FALSE}
remotes::install_github("nrennie/PrettyCols")

Then load into R:

library(PrettyCols)

To see the names of all available palettes, run:

names(PrettyColsPalettes)

To see the colours in a specific palette, use the prettycols() function:

prettycols("Tangerines")

By default a discrete palette showing all colours is displayed. Setting type = "continuous" displays a continuous palette, changing n changes the number of colours, and switching direction = -1 reverses the order of colours. For example:

prettycols("Tangerines", n = 50, type = "continuous", direction = -1)

To see all available palettes, run:

view_all_palettes()

or,

view_all_palettes(type == "all")

Palettes are categorised into three types:

Palettes can be viewed by type. For example, to see all sequential colour palettes, run:

view_all_palettes(type = "seq")


Try the PrettyCols package in your browser

Any scripts or data that you put into this service are public.

PrettyCols documentation built on June 22, 2024, 9:57 a.m.