jdb_palette: A palette generator

Description Usage Arguments Value Examples

View source: R/colors.R

Description

These are a handful of color palettes for the Buenrostrolab.

Usage

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

Arguments

name

Name of desired palette. Choices are: lots.

n

Number of colors desired.

type

Either "continuous" or "discrete". Use continuous if you want to automatically interpolate between colours.

Value

A vector of colours.

Examples

1
2
3
4
5
6
7
8
9
jdb_palette("Cavalcanti")
jdb_palette("Cavalcanti", 3)
jdb_palette("Cavalcanti", c(1,3))

# If you need more colours than normally found in a palette, you
# can use a continuous palette to interpolate between existing
# colours
pal <- jdb_palette(name = "Zissou", 21,  type = "continuous")
image(volcano, col = pal)

caleblareau/BuenColors documentation built on March 7, 2020, 3:34 p.m.