Learn R Programming

beyonce (version 0.1)

beyonce_palette: Beyonc<U+00E9> palette generator

Description

A lot of Beyonc<U+00E9> color palettes.

Usage

beyonce_palette(number, n, type = c("discrete", "continuous"))

Arguments

number
ID of desired palette (1 to 130)
n
Number of colors desired. Unfortunately most palettes now only have 4 or 5 colors. But hopefully we'll add more palettes soon. All color schemes are derived from the most excellent Tumblr blog: http://beyoncepalettes.tumblr.com/. If omitted, uses all colours.
type
Either "continuous" or "discrete". Use continuous if you want to automatically interpolate between colours.

Value

A vector of colours.

Examples

Run this code
beyonce_palette(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 <- beyonce_palette(21, number = 2, type = "continuous")
image(volcano, col = pal)

Run the code above in your browser using DataLab