si_palettes: List of SI Color Palettes

si_palettesR Documentation

List of SI Color Palettes

Description

Sets of color palettes that have been collected by the SI team. Includes all colors from the SIEI data visualization guide and a few additional palettes. Colors are stored as a named list. Use palette name or position to call in colors.

Color sets are stored as the name of the first color. Calling si_palettes$viking_d will return the five color palette where viking is the base. Calling si_palettes$viking_c will return an interpolated ramp of 10 colors for viking Calling si_palettes$viking_t will return viking and four tints at 80%, 60%, 40%, and 20%. See the SIEI data visualization guide for additional details.

Usage

si_palettes

Format

An object of class list of length 74.

See Also

si_rampr for details on creating interpolated palettes of varying lengths.

Examples

## Not run: 
library(scales)

# List names of palettes available
names(si_palettes)

show_col(si_palettes$siei)
show_col(si_palettes$lavender_haze_d)
show_col(si_palettes$hunter_t)
show_col(si_palettes$sun_kissed_c)

# Show palettes interpolated
si_rampr("carto_div_earth", n = 10) %>% show_col(labels = T)
si_rampr("carto_div_earth", n = 100) %>% show_col(labels = FALSE)

## End(Not run)

USAID-OHA-SI/glitr documentation built on July 5, 2024, 3:24 p.m.