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

sRGBtoMunsell

Convert sRGB coordinates to a Munsell specification


Description

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

Usage

sRGBtoMunsell( sRGB, maxSignal=255, ... )

Arguments

sRGB

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

maxSignal

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

...

other parameters passed to XYZtoMunsell()

Details

The conversion is done in 3 steps.

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

  • XYZ is adapted from Illuminant D65 (from the sRGB standard) to Illuminant C using the Bradford chromatic adaptation method (CAT)

  • XYZ → HVC using XYZtoMunsell()

Value

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

Note

The function RGBtoMunsell() 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

sRGBtoMunsell( c(255,45,67) )
##                     H        V        C
##  5.4R 5.5/18 5.401135 5.477315 18.01984

sRGBtoMunsell( c(1,0,1), maxSignal=1 )
##                 H        V        C
##  8P 6/26 87.98251 5.981297 25.64534

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.