sri_palette: An SRI palette generator

Description Usage Arguments Value Examples

Description

These are custom SRI color palettes

Usage

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

Arguments

name

Name of desired palette. Choices are: sricolors, sricolors2, sricool, srisunset, srioranges, sriblues

n

Number of colors desired. 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
11
12
13
14
sri_palette("sricolors")
sri_palette("sricool")
sri_palette("srisunset")

ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
geom_point(size = 3) +
scale_color_manual(values = sri_palette("sricolors"))


# If you need more colors than normally found in a palette, you
# can use a continuous palette to interpolate between existing
# colors
pal <- sri_palette(12, name = "sricool", type = "continuous")
image(volcano, col = pal)

kmwest/SRI documentation built on May 28, 2019, 4:01 p.m.