get_color: get a hex color string

Description Usage Arguments Value

View source: R/get_color.R

Description

This internal function stores colors for plotting. Given a color name ("green", "purple", "red", "orange", "blue", "brown", "yellow", "gray") and a darkness: "l" for light colors, "d" for dark colors and "f" for the full light/dark spectrum this function returns the corresponding ramp of colors.

Usage

1
2
3
4
get_color(
  col_name = c("green", "purple", "red", "orange", "blue", "brown", "yellow", "gray"),
  light_dark = c("f", "l", "d")
)

Arguments

col_name

string color name. Must be one of "green", "purple", "red", "orange", "blue", "brown", "yellow", "gray"

light_dark

character value. One of ("f", "l", "d"). "l" indicates light colors, "d" indicates dark colors, and "f" indicates colors ranging from light to dark.

Value

a vector of length four containing the hex colors indicated by the parameters


cape documentation built on Feb. 10, 2021, 5:06 p.m.