Convert/coerce to CIELUV matrix
pth_to_cieluv(color, whitepoint = whitepoints_cie1931("D65"))
pth_new_cieluv(mat, whitepoint = whitepoints_cie1931("D65"))
character
or matrix
with S3 class pth_mat
, a
representation of a color.
double
array
with one dimension, length three;
describes the whitepoint reference for the color space.
double
matrix
with three columns, one row for each color.
double
matrix
with S3 classes pth_cieluv
and pth_mat
,
with three columns, one row for each color.
pth_to_cieluv("#663399")
#> L* u* v*
#> [1,] 32.90247 12.98289 -67.7538
#> attr(,"class")
#> [1] "pth_cieluv" "pth_mat"
#> attr(,"whitepoint")
#> [1] 95.047 100.000 108.883
pth_new_cieluv(matrix(c(32.9, 13.0, -67.8), ncol = 3))
#> L* u* v*
#> [1,] 32.9 13 -67.8
#> attr(,"class")
#> [1] "pth_cieluv" "pth_mat"
#> attr(,"whitepoint")
#> [1] 95.047 100.000 108.883