np_palette: A National Parks of the United States palette generator

Description Usage Arguments Value Examples

Description

These are a handful of color palettes pulled from photographs of US National Parks.

Usage

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

Arguments

name

Name of desired palette. Choices are: badlands, deathvalley, smokies, picturedrocks, lakesuperior, tallgrass, rockymtn, flatirons, shenandoah, shenandoah2, kingscanyon, kingscanyon2, smokies2, smokies3, arches, bryce, grandtetons, conagree, zion, yellowstone

n

Number of colors desired. Unfortunately most palettes now only have 5 colors. These palettes are picked using color.adobe.com from photographs provided by J.W. Atkins, E. Agee, A. R. Woleslagle. 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
np_palette("badlands")
np_palette("deathvalley")
np_palette("deathvalley", 3)

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

atkinsjeff/nationalpark documentation built on May 23, 2019, 8:02 p.m.