col_ramp_brewer: Color ramp shortcuts

col_ramp_brewerR Documentation

Color ramp shortcuts

Description

Quick shortcuts for RColorBrewer color ramp palettes that map [0,1] to colors

Usage

col_ramp_brewer(
  palette = rownames(RColorBrewer::brewer.pal.info),
  alpha = 0.4,
  convert_alpha_to_white = TRUE
)

col_rmp_red(x)

col_rmp_blue(x)

Arguments

palette

An RColorBrewer palette.

alpha

Transparency. Default 0.4.

convert_alpha_to_white

If true, will use the alpha value to internally generate RBG values (instead of RBGA) assuming a white background

x

Argument to the returned object, which is a function that maps (0,1) -> hex color code.


adamleejohnson/R-ajtools documentation built on April 4, 2022, 7:24 a.m.