tintin_clrs.Rd
This function creates a vector of colours along the selected colour map.
tintin_clrs(
n = 5,
alpha = 1,
begin = 0,
end = 1,
direction = 1,
option = "the_blue_lotus"
)
The number of colors (≥1) to be in the palette.
The alpha transparency, a number in [0,1]
, see argument alpha in
hsv
.
The (corrected) hue in [0,1]
at which the color map begins.
The (corrected) hue in [0,1]
at which the color map ends.
Sets the order of colors in the scale. If 1, the default, colors are ordered from darkest to lightest. If -1, the order of colors is reversed.
A character string indicating the color map option to use. Options are available with tidy names (i.e., 'the_blue_lotus'):
A character
vector of colors.
Check the README for the display of the color palettes.
Semi-transparent colors (0<alpha<1) are supported only on some
devices (see rgb
).
# without extrapolation: 5 or fewer colors
n <- 5
tintin_clrs(n, option = "the_blue_lotus")
#> [1] "#e30013" "#1a9abd" "#8d512d" "#de9c62" "#30515a"
image(
1:n, 1, as.matrix(1:n),
col = tintin_clrs(n, option = "the_blue_lotus"),
xlab = "Tintin darkblue n", ylab = "", xaxt = "n", yaxt = "n", bty = "n"
)
# with extrapolation: 6 or more colors
n <- 20
image(
1:n, 1, as.matrix(1:n),
col = tintin_clrs(n, option = "the_blue_lotus"),
xlab = "Tintin darkblue n", ylab = "", xaxt = "n", yaxt = "n", bty = "n"
)