ColorlabFormatToMunsellSpec: Convert Colorlab Munsell Format to Munsell HVC

View source: R/Colorlab.R

ColorlabFormatToMunsellSpecR Documentation

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.

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

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.

Author(s)

Jose Gama and Glenn Davis

References

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

See Also

MunsellSpecToColorlabFormat()

Examples

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

munsellinterpol documentation built on April 8, 2022, 9:07 a.m.