makeColors: Represent numerical values by a color vector

View source: R/makeColors.R

makeColorsR Documentation

Represent numerical values by a color vector

Description

makeColors builds a vector of RGB colors to represent numerical values. This color representation is generated by applying piecewise color mapping to input values.

Usage

makeColors(
  p,
  thresholds = c(10, 50, 500, 5000),
  colors = c("blue", "yellow", "red", "black"),
  background = "white",
  overflow = "white"
)

Arguments

p

vector of positive numeric values.

thresholds

numeric vector defining the boundaries between ranges of values to be mapped into a specific color interval (default = c(10, 50, 500, 5000)).

colors

color vector providing the colors representing each threshold value (default = c("blue", "yellow", "red", "black")).

background

color representing p = 0, which is set to "white" by default.

overflow

color representing p > max(thresholds), which is set to "white" by default.

Value

makeColors returns a character vector of RGBA colors in hexadecimal.

Author(s)

Benjamin Leblanc

See Also

domainogram


benja0x40/MRA.TA documentation built on March 13, 2023, 5:15 a.m.