View source: R/recolorize_adjacency.R
rgb2hsl | R Documentation |
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)
rgb_matrix |
RGB colors in an nx3 matrix (rows = colors, columns = channels). |
radians |
Logical. Return HSL colors in units of radians
( |
pavo_hsl |
Logical. Return HSL matrix in a format that
can be passed directly to pavo::adjacent as the |
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
).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.