Learn R Programming

aelab (version 1.1.0)

aelab_palettes: aelab_palettes

Description

Retrieve a named aelab colour palette as a character vector.

Usage

aelab_palettes(name, n, type = c("discrete", "continuous"))

Value

A character vector of hex colour codes with class "palette".

Arguments

name

Name of the palette (string).

n

Number of colours to return. Defaults to the full palette length.

type

"discrete" (default) or "continuous". For "continuous", colours are interpolated to length n.

Details

Available palette names: "rainbow", "two", "control", "control2", "control3", "period", "ghg".

Examples

Run this code
aelab_palettes("rainbow", 5)
aelab_palettes("ghg", type = "continuous", n = 20)

Run the code above in your browser using DataLab