Skip to contents

Returns one or more hex color codes from predefined IOM color palettes.

Usage

pal(color, shade = 1)

Arguments

color

Character. Name of the color palette. Must be one of "blues", "unblues", "yellows", "greens", "oranges", "reds", or "grays".

shade

Integer vector. Shade(s) to select from 1 (darkest) to 5 (lightest). Can be a single number or a vector of shades.

Value

Character vector of hex color codes corresponding to the selected shades.

Examples

pal("blues")
#> [1] "#0033A0"
pal("reds", c(1, 3, 5))
#> [1] "#D22630" "#E99398" "#F8DEE0"