Learn R Programming

munsellinterpol (version 3.0-0)

ColorlabFormatToMunsellSpec: Convert Colorlab Munsell Format to Munsell HVC

Description

Convert Colorlab Munsell Format to Munsell HVC

Usage

ColorlabFormatToMunsellSpec( HVCH )

Arguments

HVCH

a numeric Nx4 matrix, or a vector that can be converted to such a matrix, by row. Each row of the matrix contains an HVCH vector.

Value

an Nx3 matrix, with each row an HVC vector. Value and Chroma are simply copied unchanged. The complex part is conversion of Colorlab Hue Step and Hue Index to Hue Number. For neutrals, both Hue Step and Hue Index are ignored. Invalid input values, such as a Hue Index that is not an integer from 0 to 10 (except for neutrals), are converted to NAs. The rownames of the input are copied to the output, but if these are NULL, the rownames are set to the Munsell notations.

Details

Colorlab Munsell format uses 4 numbers.

  1. Hue Step, in the interval (0,10], or 0 for neutrals

  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

References

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

See Also

MunsellSpecToColorlabFormat()

Examples

Run this code
# NOT RUN {
ColorlabFormatToMunsellSpec( c( 3.2,3,2,1,  2,5.1,0,0, 2,5.1,0.1,0 ) )
##                     H   V  C
##  3.20B 3.00/2.00 63.2 3.0  2
##  N 5.10/          0.0 5.1  0
##  <NA>              NA  NA NA
# }

Run the code above in your browser using DataLab