td_pal: TD palettes

View source: R/palettes.R

td_palR Documentation

TD palettes

Description

Returns a function for a discrete TD color palette, or for interpolating a continuous one via grDevices::colorRampPalette().

Usage

td_pal(palette = "pastel6", type = "discrete", reverse = FALSE)

Arguments

palette

Character name of palette:

  • "pastel6" (default)

  • "div5"

type

One of "discrete" (default) or "continuous".

reverse

Logical to reverse palette order.

Examples

library(scales)
show_col(td_pal()())
show_col(td_pal("pastel6")(6))
show_col(td_pal("pastel6", reverse = TRUE)(3))
show_col(td_pal("div5")(5))
show_col(td_pal("div5", type = "continuous")(10))

taylordunn/dunnr documentation built on Aug. 8, 2022, 12:28 p.m.