See the available palettes using list_palettes. pal will also search for the palette name in RColorBrewer and return it if found.

pal(palette_name, n = NULL, evenly_spaced = TRUE)

Arguments

palette_name

the palette's name

n

the number of colors to return, will default to the actual size of the palette, will recycle when necessary

evenly_spaced

if TRUE, when the pallete has e.g. 5 colors but only 3 are requested, color 1, 3, and 5 will be returned.

Value

a character vector of hex colors