Learn R Programming

colourvalues (version 0.3.9)

get_palette: Get Palette

Description

retrieves one of the available palettes

Usage

get_palette(palette, rgb = TRUE)

Value

3 column matrix if rgb = TRUE, otherwise a 256-length vector.

Arguments

palette

one of the available paletes. See colour_palettes

rgb

logical indicating if the palette should be returned as an RGB matrix TRUE, or a vector of hex strings FALSE

Examples

Run this code

get_palette( "viridis" )
get_palette( "rainbow" )

Run the code above in your browser using DataLab