Learn R Programming

munsellinterpol (version 2.0.1)

sRGBtoMunsell: Convert sRGB coordinates to a Munsell specification

Description

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

Usage

sRGBtoMunsell( sRGB, maxValue=255, adaption='bradford', ... )

Arguments

sRGB

a numeric Nx3 matrix with sRGB coordinates in the rows, or a vector that can be converted to such a matrix, by row. These are non-linear display values, but they are not required to be integers.

maxValue

maximum value of sRGB for display. Other popular values are 1, 1023, and 65535. Even when 1, they are still taken to be non-linear display values.

adaption

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

...

other parameters passed to XYZtoMunsell()

Value

a numeric Nx3 matrix with HVC coordinates in the rows. The rownames are copied from input to output.

Details

The conversion is done in 3 steps.

  • sRGB XYZ using srgb2xyz() with the given maxValue

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

  • XYZ HVC using XYZtoMunsell()

References

Wikipedia. sRGB. https://en.wikipedia.org/wiki/SRGB.

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

See Also

srgb2xyz(), adaption, XYZtoMunsell()

Examples

Run this code
# NOT RUN {
sRGBtoMunsell( c(255,45,67) )
sRGBtoMunsell( c(1,0,1), maxValue=1 )   
# }

Run the code above in your browser using DataLab