Learn R Programming

webmorphR (version 0.1.1)

lab2rgb: Lab to RGB Conversion

Description

Lab colourspace to RGB conversion. Calculated with Observer. = 2<U+00B0>, Illuminant = D65.

Usage

lab2rgb(lab, ref_X = 95.047, ref_Y = 100, ref_Z = 108.883)

Arguments

lab
ref_X, ref_Y, ref_Z

Reference values for Observer= 2<U+00B0>, Illuminant= D65

Value

vector of red, green and blue values

Details

The formulas used to convert from Lab to XYZ and XYZ to RGB are from http://www.easyrgb.com/en/math.php and the reference values are from http://www.brucelindbloom.com/index.html?ColorCheckerCalcHelp.html

See Also

Other color: col2lab(), color_conv()

Examples

Run this code
# NOT RUN {
lab <- c(100, 0, 0)
lab2rgb(lab)

lab <- col2lab("red")
lab2rgb(lab)
# }

Run the code above in your browser using DataLab