View source: R/launderMunsell.R
| launderMunsell | R Documentation |
This function will "launder" colors in Munsell notation, fixing (and optionally flagging) the following:
colors specified with 0-chroma will be converted to neutral hue (N) and original value
for neutral colors, any chroma >0 will be set to 0
non-standard hues will be converted to NA (unless standardHues = FALSE)
Examples:
'10YR 2/0' -> 'N 2/0'
'N 4/1 -> 'N 4/0'
'5Z 3/3' -> NA
'5YR 3/' -> NA (hues other than N must have a valid chroma)
See formatMunsell() for additional details.
launderMunsell(m, verbose = FALSE, ...)
m |
character vector of Munsell colors |
verbose |
logical, optionally return a |
... |
additional arguments to |
either character vector, or when verbose = TRUE a data.frame
formatMunsell()
# => 'N 2/0'
launderMunsell('10YR 2/0')
# => 'N 4/0'
launderMunsell('N 4/1')
# alternative neutral convention => 'N 4/'
launderMunsell('N 4/0', neutralConvention = 'empty')
# => 'N 4/0'
launderMunsell('N 4/NA')
launderMunsell('N 4/')
# => 'N 4/0'
launderMunsell('5GY 4/0')
# not a standard hue => NA
launderMunsell('4ZR 4/6')
# missing chroma, not N => NA
launderMunsell('2.5Y 4/')
# invalid chroma => NA
launderMunsell('2.5Y 4/A')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.