make_palette: A color palette generator

Description Usage Arguments Value Examples

View source: R/color-palettes.R

Description

A color palette generator

Usage

1
make_palette(name, n, type = c("discrete", "continuous"))

Arguments

name

Name of desired palette. Choices are: amboseli_div

n

Number of colors desired. If omitted, uses all colours.

type

Either "continuous" or "discrete". Use continuous if you want to automatically interpolate between colors. @importFrom graphics rgb rect par image text

Value

A vector of colours.

Examples

1
2
3
4
5
6
7
8
make_palette("amboseli_div")
make_palette("amboseli_div", 5)

# If you need more colors than normally found in a palette, you
# can use a continuous palette to interpolate between existing
# colors
pal <- make_palette(name = "amboseli_div", n = 100, type = "continuous")
image(volcano, col = pal)

amboseli/ramboseli documentation built on March 18, 2021, 12:03 a.m.