color_palette: Construct a new color palette

Description Usage Arguments Note

View source: R/color_palette.R

Description

Construct a new color palette

Usage

1
2
3
color_palette(pal, n, type = c("discrete", "continuous"))

is_color_palette(pal)

Arguments

pal

A character vector of color hex codes.

n

(optional) number to indicate how many values to include in the color palette.

Note

If type is set to "discrete", n cannot be greater than the number of unique values in pal. n can be greater than number of unqiue values in pal when type = "continuous". In the latter case, colors are interpolated with grDevices::colorRampPalette().


JosiahParry/cpcinema documentation built on March 20, 2021, 12:04 a.m.