fromPolar: Convert CIE Lab and Luv from Polar Form to Rectangular Form

fromPolarR Documentation

Convert CIE Lab and Luv from Polar Form to Rectangular Form

Description

Convert the Polar Form of CIE Lab and Luv to Rectangular Form

Usage

LabfromLCHab( LCHab ) 
LuvfromLCHuv( LCHuv ) 

Arguments

LCHab

a numeric Nx3 matrix with CIE LCHab coordinates in the rows, or a vector that can be converted to such a matrix, by row. The hue angle H must be in degrees.

LCHuv

a numeric Nx3 matrix with CIE LCHuv coordinates in the rows, or a vector that can be converted to such a matrix, by row. The hue angle H must be in degrees.

Value

LabfromLCHab()

returns a numeric Nx3 matrix with CIE Lab coordinates in the rows.

LuvfromLCHuv()

returns a numeric Nx3 matrix with CIE Luv coordinates in the rows.

In both cases, the rownames are copied from input to output. If the input is invalid, the functions return NULL.

References

Wikipedia. CIE 1931 color space. https://en.wikipedia.org/wiki/CIE_1931_color_space

See Also

LCHabfromLab(), LCHuvfromLuv()

Examples

LabfromLCHab( c(50,10,45) ) 
##        L        a        b
##  [1,] 50 7.071068 7.071068     #  on line with slope 1

spacesXYZ documentation built on April 1, 2022, 9:06 a.m.