MunsellToLab Converts a
Munsell specification to CIE Lab coordinates, by interpolating over the
extrapolated Munsell renotation data
MunsellToLab( MunsellSpec, white='D65', adapt='Bradford', ... )An Nx3 matrix with the Lab coordinates in each row.
The rownames of Lab are copied from the input HVC matrix,
unless the rownames are NULL and
then the output rownames are the Munsell notations for HVC.
a numeric Nx3 matrix with HVC values in the rows, or a vector that can be converted to such a matrix, by row.
MunsellSpec can also be a character vector with Munsell Notations,
which is converted to an Nx3 matrix HVC using HVCfromMunsellName()
XYZ for the source white - a numeric 3-vector with scaling irrelevant.
white can also be a numeric 2-vector; which is interpreted as xy chromaticity and converted to XYZ with Y=100.
white can also be the name of any standard illuminant recognized by
spacesXYZ::standardXYZ() which is scaled so that Y=100.
The default 'D65' is converted to c(95.047,100,108.883).
method for chromatic adaptation, see spacesXYZ::CAT() for valid values.
Also see Details.
other parameters passed to MunsellToXYZ()
For an overview see: Appendix E - Logging and Condition Signaling in the User Guide.
In case of an ERROR event, a condition is signaled with one of these additional
S3 classes: "invalid_argument" or "package_unavailable",
whichever is appropriate.
The invalid argument, or the name of the unavailable package, is added to the condition object.
If any of the input Values or Chromas are out of range,
a WARN event is issued, and a warning condition is signaled with the additional
S3 class "munsell_clamp".
The condition object also has the submatrix of the invalid rows of HVC
as item invalid, and their indexes as item indexes.
Jose Gama and Glenn Davis
The conversion is done in these steps:
HVC → XYZ using MunsellToXYZ(). XYZ is adapted from Illuminant C to the given white using spacesXYZ::adaptXYZ().
and the given chromatic adaptation method
XYZ → Lab using spacesXYZ::LabfromXYZ() with the given white
Paul Centore 2014 The Munsell and Kubelka-Munk Toolbox https://www.munsellcolorscienceforpainters.com/MunsellAndKubelkaMunkToolbox/MunsellAndKubelkaMunkToolbox.html
LabToMunsell(),
MunsellToXYZ(),
spacesXYZ::LabfromXYZ(),
spacesXYZ::standardXYZ(),
spacesXYZ::adaptXYZ(),
spacesXYZ::CAT()
MunsellToLab( c('7.6P 8.9/2.2', 'N 5/' ) )
## L a b
## 7.6P 8.9/2.2 89.19097 5.09879 -3.250468
## N 5/ 51.00375 0.00000 0.000000
Run the code above in your browser using DataLab