Learn R Programming

munsellinterpol (version 2.0.1)

MunsellTosRGB: Convert a Munsell specification to sRGB coordinates

Description

MunsellTosRGB Converts a Munsell specification to sRGB coordinates, by interpolating over the extrapolated Munsell renotation data

Usage

MunsellTosRGB( MunsellSpec, maxValue=255, adaption='bradford', ... )

Arguments

MunsellSpec

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 using HVCfromMunsellName().

maxValue

maximum of sRGB for display; Other popular values are 1, 1023, and 65535

adaption

method for chromatic adaption, see adaption for valid values. Also see Details.

...

other parameters passed to MunsellToxyY()

Value

a data.frame with these columns

xyY

an Nx3 matrix with xyY values in the rows, that are adapted to Illuminant C. This is an intermediate result that is sometimes useful, e.g. it can be passed to IsWithinMacAdamLimits().

sRGB

an Nx3 matrix with non-linear sRGB display values in the rows. All values are clamped to the appropriate cube, e.g. \([0,255]^3\)

OutOfGamutFlag

logical vector, TRUE means the result was out of gamut (the cube) before clamping it

Details

The conversion is done in these steps.

  • HVC xyY using MunsellToxyY(). This xyY is for Illuminant C.

  • xyY is adapted from Illuminant C to Illuminant D65 (from the sRGB standard) using adaptxyY() and the given adaption method

  • xyY XYZ using xyY2XYZ()

  • XYZ sRGB using xyz2srgb() with the given maxValue

References

Paul Centore 2014 The Munsell and Kubelka-Munk Toolbox http://www.99main.com/~centore/MunsellAndKubelkaMunkToolbox/MunsellAndKubelkaMunkToolbox.html

See Also

labtoMunsell(), MunsellToXYZ(), xyz2srgb(), xyY2XYZ(), IsWithinMacAdamLimits()

Examples

Run this code
# NOT RUN {
MunsellTosRGB('7.6P 8.9/2.2')
# }

Run the code above in your browser using DataLab