wa_pal: Washington State Color Palette Generator

View source: R/colors.R

wa_palR Documentation

Washington State Color Palette Generator

Description

Generate palette objects from the wacolors list

Usage

wa_pal(
  palette,
  n,
  which = NULL,
  type = c("discrete", "continuous"),
  reverse = FALSE
)

Arguments

palette

The name of the palette (partial matching supported), or an actual palette from [wacolors].

n

The number of colors in the palette. If this exceeds the actual number and type is not provided, it will be set to continuous.

which

if not NULL, the indices or names of a subset of colors to use.

type

Either continuous or discrete. Use continuous if you want to automatically interpolate between colors.

reverse

TRUE if palette should be reversed.

Value

A vector of colors of type palette. Use the plot() function to plot the palette. If the cli package is installed, printing the palette to the console will also show its colors.

Examples

wa_pal("rainier")
wa_pal(wacolors$rainier)
wa_pal("sound_sunset", 20, "continuous")
wa_pal("washington_pass", reverse=TRUE)


wacolors documentation built on March 18, 2022, 6:08 p.m.