Skip to contents

These are a few color palettes useful for the production of graphs for the Sahel ASP RCT program. This function calls one of two official palettes in asp_palette: one dark theme and one light theme.

Usage

asp_palette(name, n, type = c("discrete", "continuous"))

Arguments

name

Name of desired palette. Current choices are: IHEID, Centres, and SDGs.

n

Number of colors desired. If omitted, uses all colors.

type

Either "continuous" or "discrete". Use continuous if you want to automatically interpolate between colors.

Value

A vector of colors.

Examples

asp_palette("Dark")

asp_palette("Light")


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