Convert/coerce to CAM02-UCS matrix

pth_to_cam02ucs(
  color,
  c = 0.69,
  Y_b = 20,
  L_A = 64/pi/5,
  whitepoint = whitepoints_cie1931("D65")
)

pth_new_cam02ucs(
  mat,
  c = 0.69,
  Y_b = 20,
  L_A = 64/pi/5,
  whitepoint = whitepoints_cie1931("D65")
)

Arguments

color

character or matrix with S3 class pth_mat, a representation of a color.

c

numeric surround parameter, between 0.535 (dark) and 0.69 (average).

Y_b

numeric background luminance.

L_A

numeric luminance of the adapting field (cd/m^2).

whitepoint

double array with one dimension, length three; describes the whitepoint reference for the color space.

mat

double matrix with three columns, one row for each color.

Value

double

matrix with S3 classes pth_cam02ucs and pth_mat, with three columns, one row for each color.

Examples

  pth_to_cam02ucs("#663399")
#>            J'       a'        b'
#> [1,] 35.54575 13.37374 -24.18413
#> attr(,"class")
#> [1] "pth_cam02ucs" "pth_mat"     
#> attr(,"c")
#> [1] 0.69
#> attr(,"Y_b")
#> [1] 20
#> attr(,"L_A")
#> [1] 4.074367
#> attr(,"whitepoint")
#> [1]  95.047 100.000 108.883
  pth_new_cam02ucs(matrix(c(35.5, 13.4, -24.2), ncol = 3))
#>        J'   a'    b'
#> [1,] 35.5 13.4 -24.2
#> attr(,"class")
#> [1] "pth_cam02ucs" "pth_mat"     
#> attr(,"c")
#> [1] 0.69
#> attr(,"Y_b")
#> [1] 20
#> attr(,"L_A")
#> [1] 4.074367
#> attr(,"whitepoint")
#> [1]  95.047 100.000 108.883