a4palette {a4Base}R Documentation

Utility function that defines a color palette for use in a4

Description

Utility function that defines a color palette for use in a4

Usage

a4palette(n, alpha = 1, Janssen = FALSE)

Arguments

n

Number of color levels the palette should provid

alpha

alpha transparency level of the colors

Janssen

logical. If TRUE, Janssen Pharmaceutical colors are used (with a maximum of 6 possible colors).

Details

For n = 1, "blue" is returned; for n = 2 c("red", "blue") is returned; for n = 3 c("red", "green", "blue" is returned; for n = 4 c("red", "green", "blue", "purple") is returned and for n > 2, the output of rainbow(n) is returned.

Value

a character vector of colors

Author(s)

Steven Osselaer, Tobias Verbeke

See Also

rainbow palette in palettes

Examples

 op <- par(mfrow = c(2, 3))
 for (nGroups in 1:6)
  pie(rep(1, nGroups), a4palette(nGroups))
 par(op)

[Package a4Base version 1.42.0 Index]