Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

MunsellTosRGB

Convert a Munsell specification to sRGB coordinates


Description

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

Usage

MunsellTosRGB( MunsellSpec, maxSignal=255, ... )

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

maxSignal

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

...

other parameters passed to MunsellToxyY()

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 Bradford chromatic adaptation method (CAT)

  • xyY → XYZ using XYZfromxyY()

  • XYZ → sRGB using RGBfromXYZ() with the given maxSignal

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

RGB

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

OutOfGamut

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

Note

The function MunsellToRGB() also performs this conversion. The only reason to use this one is that it takes a little less time, since the CAT (using the Bradford method) is precomputed.

Author(s)

Jose Gama and Glenn Davis

References

See Also

Examples

MunsellTosRGB('7.6P 8.9/2.2')
##                SAMPLE_NAME      xyY.x      xyY.y      xyY.Y    RGB.R    RGB.G    RGB.B OutOfGamut
##  7.6P 8.9/2.2 7.6P 8.9/2.2  0.3109520  0.3068719 74.6134498 231.3575 221.1421 230.3501      FALSE

munsellinterpol

Interpolate Munsell Renotation Data from Hue/Chroma to CIE/RGB

v2.6-1
GPL (>= 3)
Authors
Jose Gama [aut, trl], Paul Centore [aut, cph], Glenn Davis [aut, cre]
Initial release
2020-02-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.