get_color: get a hex color string

View source: R/get_color.R

get_colorR Documentation

get a hex color string

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

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


TheJacksonLaboratory/CAPE documentation built on Feb. 12, 2024, 4:32 p.m.