Description Usage Arguments Details Value Author(s) Examples
View source: R/munsell_to_rgb.R
This funcion converts a vector of munsell colors in the form hue value/chroma into an RGB R color. Vectors are passed to 'as.character' for conversion. Hue and chroma must be strictly separated by a space, whereas chroma and value by a '/'. It is internally called in the 'plot.profile.data.frame' function.
1 | munsell_to_rgb(color, name)
|
color |
A string or vector containing Munsell color(s) in the form Hue value/chroma. |
name |
This argument is taken in the workflow of the 'plot.data.frame' function, with the purpose to give the horizon name in case of warning. |
The function separates Hue, value and chroma by calling 'substr' and then calls the function munsell2rgb aqp for the conversion into R colors. If the color is not existing (be either because of wrong separation between Hue value and chroma, or unexisting munsell color), it defaults to '#39302CFF' and returns a warning.
A vector of R colors
Gianluca Filippa
1 2 | ##a 5Y 5/3 (dark brown) boxplot
boxplot(1:10, col=munsell_to_rgb(example[[6]][1]), main='A 5Y 5/3 (dark brown) boxplot')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.