wa_pal: Washington State Color Palette Generator

Description Usage Arguments Value Examples

View source: R/colors.R

Description

Generate palette objects from the wacolors list

Usage

1
2
3
4
5
6
7
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. If printed to the console, will plot the palette as well.

Examples

1
2
3
4
wa_pal("rainier")
wa_pal(wacolors$rainier)
wa_pal("sound_sunset", 20, "continuous")
wa_pal("washington_pass", reverse=TRUE)

wacolors documentation built on May 17, 2021, 9:08 a.m.