Description Usage Arguments Value Examples
View source: R/celda_functions.R
Generate a palette of 'n' distinct colors.
1 2 3 4 5 6 | distinctColors(
n,
hues = c("red", "cyan", "orange", "blue", "yellow", "purple", "green", "magenta"),
saturationRange = c(0.7, 1),
valueRange = c(0.7, 1)
)
|
n |
Integer. Number of colors to generate. |
hues |
Character vector. Colors available from 'colors()'. These will be used as the base colors for the clustering scheme in HSV. Different saturations and values will be generated for each hue. Default c("red", "cyan", "orange", "blue", "yellow", "purple", "green", "magenta"). |
saturationRange |
Numeric vector. A vector of length 2 denoting the saturation for HSV. Values must be in [0,1]. Default: c(0.25, 1). |
valueRange |
Numeric vector. A vector of length 2 denoting the range of values for HSV. Values must be in [0,1]. Default: 'c(0.5, 1)'. |
A vector of distinct colors that have been converted to HEX from HSV.
1 | colorPal <- distinctColors(6) # can be used in plotting functions
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.