A palette generator for the Sahel Adaptive Social Protection RCT
asp_palette.Rd
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"))
Source
Adapted from https://github.com/karthik/wesanderson/blob/master/R/colors.R
Arguments
- name
Name of desired palette. Current choices are:
IHEID
,Centres
, andSDGs
.- 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.
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)