Get color using surface, luminance, and saturation

pth_color_sfclumsat(surface, lum, sat = 1)

Arguments

surface

object with S3 class pth_surface.

lum

double luminance of the color, 0 <= lum <= 100.

sat

double saturation of the color, 0 <= sat <= 1.

Value

Object with S3 class pth_mat, describing a color.

Examples

  sfc_blue <- pth_new_surface("#0000FF")
  color <- pth_color_sfclumsat(sfc_blue, lum = 50, sat = 1)

  pth_to_hex(color)
#> [1] "#6161ff"
#> attr(,"class")
#> [1] "pth_hex"