validateMunsell: Validate Standard Munsell Notation

View source: R/validateMunsell.R

validateMunsellR Documentation

Validate Standard Munsell Notation

Description

This function validates Munsell color notation according to the following requirements:

  1. hue must not be absent, and within the set of "standard hues", see huePosition()

  2. value must not be absent, and within vRange

  3. chroma must be within cRange, and is only allowed to be absent in neutral colors (e.g. ⁠N 4/⁠)

Usage

validateMunsell(m, vRange = c(1, 10), cRange = c(0, 50))

Arguments

m

character vector of colors in Munsell notation

vRange

numeric vector of length 2, range of expected Munsell value

cRange

numeric vector of length 2, range of expected Munsell chroma

Value

logical vector,

  • TRUE: valid Munsell notation

  • FALSE: invalid notation

See Also

huePosition()

Examples


# valid
validateMunsell('5Y 6/8')
validateMunsell('N 4/')
validateMunsell('2.5Y 4/0')

# invalid
validateMunsell('5G 0/4')
validateMunsell(NA)

# mixture
validateMunsell(c('5G 4/4', 'N 2/', NA, 'NA', '100R 3/3'))


aqp documentation built on April 30, 2026, 9:06 a.m.