Description Usage Arguments Details Examples
Generate a randomly selected colour palette
1 2 | randcolours(n, l = c(0.2, 0.9), c1 = c(0, 1), c2 = c(0, 1),
alpha = 1, space = c("Luv", "Lab"))
|
n |
number of colours |
l |
lightness range |
c1 |
colour channel one range |
c2 |
colour channel two range |
alpha |
alpha channel range |
space |
should the parameters be interpreted as Luv or Lab components? |
The range of l
, c1
, c2
and alpha
, will be
interpreted as the wanted range of each colour component, whether their length
is 1, 2, or more. Although they all should nominally lie within [0, 1], only
alpha
must do so to achieve a valid output. The others can exeed this
range, at an icreased risk of clipping.
1 2 3 | set.seed(3)
n <- 20
plot(1:n, col=randcolours(n), pch=16, cex=5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.