fromPolar {spacesXYZ}R 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

[Package spacesXYZ version 1.3-0 Index]