Learn R Programming

munsellinterpol (version 3.0-0)

MunsellSpecToColorlabFormat: Convert Munsell Specification to Colorlab Format

Description

Convert Munsell Specification to Colorlab Format

Usage

MunsellSpecToColorlabFormat( MunsellSpec )

Arguments

MunsellSpec

a numeric Nx3 matrix, or a vector that can be converted to such a matrix, by row. Each row of the matrix contains an HVC vector. H is automatically wrapped to the interval (0,100]. MunsellSpec can also be a character vector with Munsell Notation; which is converted to an Nx3 matrix using HVCfromMunsellName().

Value

an Nx4 matrix, with rows as described in Details. Value and Chroma are simply copied unchanged. The complex part is conversion of Hue Number to Colorlab Hue Step and Hue Index. If Chroma is 0, both the Hue Step and Hue Index are set to 0. Invalid input values are converted to NAs. If the input is a character vector, the rownames of the returned matrix are set to that vector.

Details

Colorlab Munsell format uses 4 numbers.

  1. Hue Step, in the interval (0,10], or 0 for neutrals. In Colorlab documentation it is called the hue shade. It is also the Hue Number H mod 10 (unless H is an exact multiple of 10).

  2. Munsell Value, in the interval [0,10]

  3. Munsell Chroma, non-negative

  4. Hue Index, an integer from 1 to 10, or 0 for neutrals. This index defines the principal hue, see Details.

References

Color Processing Toolbox. Colorlab 1.0. https://www.uv.es/vista/vistavalencia/software/colorlab.html

Cleland, T. M. A Practical description of the Munsell Color System with Suggestions for its Use. (1921)

See Also

HVCfromMunsellName(), ColorlabFormatToMunsellSpec()

Examples

Run this code
# NOT RUN {
MunsellSpecToColorlabFormat( c(100,5,5, 10,3,4, 90,4,3, 77,1,2, 66,2,0, 0,1,2 ) )
##                    HN V C HI
##  10.00RP 5.00/5.00 10 5 5  8
##  10.00R 3.00/4.00  10 3 4  7
##  10.00P 4.00/3.00  10 4 3  9
##  7.00PB 1.00/2.00   7 1 2 10
##  N 2.00/            0 2 0  0
##  10.00RP 1.00/2.00 10 1 2  8
# }

Run the code above in your browser using DataLab