col2lab: Color to Lab Conversion

View source: R/col2lab.R

col2labR Documentation

Color to Lab Conversion

Description

R color to Lab colourspace conversion. Calculated with Observer. = 2°, Illuminant = D65.

Usage

col2lab(col, ref_X = 95.047, ref_Y = 100, ref_Z = 108.883)

Arguments

col

vector of hex or color names

ref_X, ref_Y, ref_Z

Reference values for Observer= 2°, Illuminant= D65

Details

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

Value

vector of L, a and b values

See Also

Other color: color_conv(), lab2rgb()

Examples

col2lab("red")
col2lab("#FF0000")


webmorphR documentation built on June 2, 2022, 5:07 p.m.