The idea for the scaling came from https://github.com/nschloe/colorio/issues/41#issuecomment-519983981.
pth_to_jzazbz100(color)
pth_new_jzazbz100(mat)
character
or matrix
with S3 class pth_mat
, a
representation of a color.
double
matrix
with three columns, one row for each color.
double
matrix
with S3 classes pth_jzazbz100
and pth_mat
,
with three columns, one row for each color.
pth_to_jzazbz100("#663399")
#> J_z a_z b_z
#> [1,] 36.34207 15.27107 -42.64039
#> attr(,"class")
#> [1] "pth_jzazbz100" "pth_mat"
pth_new_jzazbz100(matrix(c(36.3, 15,3, -42.6), ncol = 3))
#> Warning: data length [4] is not a sub-multiple or multiple of the number of columns [3]
#> J_z a_z b_z
#> [1,] 36.3 3.0 36.3
#> [2,] 15.0 -42.6 15.0
#> attr(,"class")
#> [1] "pth_jzazbz100" "pth_mat"