rand_color.Rd
Generate random colors
rand_color(n, hue = NULL, luminosity = "random", transparency = 0)
n | number of colors |
---|---|
hue | the hue of the generated color. You can use following default color name: |
luminosity | controls the luminosity of the generated color. The value should be a string containing |
transparency | transparency, numeric value between 0 and 1. |
The code is adapted from randomColor.js (https://github.com/davidmerfield/randomColor ).
points(1:10, rep(5, 10), pch = 16, cex = 5, col = rand_color(10, hue = "red", luminosity = "bright"))points(1:10, rep(6, 10), pch = 16, cex = 5, col = rand_color(10, hue = "green", luminosity = "bright"))