toPolar | R Documentation |
Convert the Rectangular Form of CIE Lab and Luv to Polar Form
LCHabfromLab( Lab )
LCHuvfromLuv( Luv )
Lab |
a numeric Nx3 matrix with CIE Lab coordinates in the rows, or a vector that can be converted to such a matrix, by row. |
Luv |
a numeric Nx3 matrix with CIE Luv coordinates in the rows, or a vector that can be converted to such a matrix, by row. |
a numeric Nx3 matrix with LCH coordinates in the rows. The lightness L is simply copied from input to output. The chroma C corresponds to radius in polar coordinates, and the hue H corresponds to theta. H is in degrees, not radians. The rownames are copied from input to output.
Wikipedia. CIE 1931 color space. https://en.wikipedia.org/wiki/CIE_1931_color_space
LabfromLCHab()
,
LuvfromLCHuv()
LCHabfromLab( c(50,0,0) ) # a neutral gray
## L Cab Hab
## [1,] 50 0 0 # Hue is undefined, but set to 0
LCHabfromLab( c(50,0,20) )
## L Cab Hab
## [1,] 50 20 90 # 90 degrees, on yellow axis
LCHabfromLab( c(50,0,-20) )
## L Cab Hab
## [1,] 50 20 270 # 270 degrees, on blue axis
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.