paletteer_d: Get discrete palette by package and name

Description Usage Arguments Value Examples

View source: R/paletteer_d.R

Description

Available package/palette combinations are available in the data.frame palettes_d_names.

Usage

1
paletteer_d(palette, n, direction = 1, type = c("discrete", "continuous"))

Arguments

palette

Name of palette as a string. Must be on the form packagename::palettename.

n

Number of colors desired. If omitted, returns complete palette.

direction

Either 1 or -1. If -1 the palette will be reversed.

type

Either "discrete" or "continuous". Colors are interpolated if "continuous" is picked. Defaults to "discrete".

Value

A vector of colors.

Examples

1
2
3
paletteer_d("nord::frost")
paletteer_d("wesanderson::Royal1", 3)
paletteer_d("Redmonder::dPBIPuOr", 14, type = "continuous")

Example output

<colors>
#8FBCBBFF #88C0D0FF #81A1C1FF #5E81ACFF 
<colors>
#899DA4FF #C93312FF #FAEFD1FF 
<colors>
#53354DFF #73496AFF #9C6D92FF #BD90B3FF #CBA7C3FF #D8BED2FF #EBE1E9FF #F8E8E1FF #FED1BDFF #FEC1A5FF #FEB18EFF #E0906BFF #B06846FF #7F4B33FF 

paletteer documentation built on July 21, 2021, 1:07 a.m.