Create vectors of n
colors.
rwb_colors(n, alpha = 1, s = 0.9, v = 0.9)
rwb.colors(n, alpha = 1, s = 0.9, v = 0.9)
rwg_colors(n, alpha = 1, s = 0.9, v = 0.9)
rwg.colors(n, alpha = 1, s = 0.9, v = 0.9)
ryg_colors(n, alpha = 1, s = 0.9, v = 0.9)
ryg.colors(n, alpha = 1, s = 0.9, v = 0.9)
cwm_colors(n, alpha = 1, s = 0.9, v = 0.9)
cwm.colors(n, alpha = 1, s = 0.9, v = 0.9)
The number of colors (>= 1) to be in the palette.
The alpha transparency, a number in [0, 1]
, see argument
alpha
in hsv()
.
The 'saturation' to be used to complete the HSV color descriptions.
The 'value' to use for the HSV color descriptions.
cwm_colors(s = 0.5, v = 1)
gives very similar colors to
cm.colors()
.
ryg_colors()
is similar to rainbow(start = 0, end = 2/6)
.
The xxx_colors()
(tidyverse name-compatible) and xxx.colors()
(grDevices name-compatible) functions are synonyms.
# Draw color wheels with various palettes
opar <- par(mfrow = c(2, 2))
pie(rep(1, 11), col = cwm.colors(11), main = "Cyan - white - magenta")
pie(rep(1, 11), col = rwb.colors(11), main = "Red - white - blue")
pie(rep(1, 11), col = rwg.colors(11), main = "Red - white - green")
pie(rep(1, 11), col = ryg.colors(11), main = "Red - yellow - green")
par(opar)