rgb2hsl {recolorize} | R Documentation |
Convert RGB colors to HSL
Description
Convert RGB colors (0-1 range) to HSL (hue-saturation-luminance) space. Used for passing RGB colors to pavo::adjacent.
Usage
rgb2hsl(rgb_matrix, radians = TRUE, pavo_hsl = TRUE)
Arguments
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 |
Value
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
).
[Package recolorize version 0.1.0 Index]