Convert RGB colors (0-1 range) to HSL (hue-saturation-luminance) space. Used for passing RGB colors to pavo::adjacent.
rgb2hsl(rgb_matrix, radians = TRUE, pavo_hsl = TRUE)
A dataframe with patch
, hue
, sat
, and lum
columns
and one row per color (if pavo_hsl = TRUE
) or a matrix of the HSL
coordinates (if pavo_hsl = FALSE
).
RGB colors in an nx3 matrix (rows = colors, columns = channels).
Logical. Return HSL colors in units of radians
(TRUE
) or degrees (FALSE
)?
Logical. Return HSL matrix in a format that
can be passed directly to pavo::adjacent as the hsl
parameter?