wes_palette: A Wes Anderson palette generator

Description Usage Arguments Value Examples

View source: R/colors.R

Description

These are a handful of color palettes from Wes Anderson movies.

Usage

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

Arguments

name

Name of desired palette. Choices are: BottleRocket1, BottleRocket2, Rushmore1, Royal1, Royal2, Zissou1, Darjeeling1, Darjeeling2, Chevalier1 , FantasticFox1 , Moonrise1, Moonrise2, Moonrise3, Cavalcanti1, GrandBudapest1, GrandBudapest2, IsleofDogs1, IsleofDogs2

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: Wes Anderson Palettes. If omitted, uses all colours.

type

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

Value

A vector of colours.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
wes_palette("Royal1")
wes_palette("GrandBudapest1")
wes_palette("Cavalcanti1")
wes_palette("Cavalcanti1", 3)

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

wesanderson documentation built on April 20, 2018, 9:04 a.m.