clr_extract_hue | R Documentation |
Extract the hue, saturation, or lightness color components from a vector of colors.
clr_extract_hue(col, space = c("HSL", "HCL"))
clr_extract_saturation(col)
clr_extract_lightness(col)
clr_extract_luminance(col)
col |
A |
space |
A character string specifying the color space where hue is extracted from. Can be either "HCL" or "HSL" (default). |
The range of the value are:
From 0 to 360 for hue. This in a circular fashion such that 0 and 360 are near identical. 0 is red.
From 0 to 100 for saturation where 100 is full saturation and 0 is no saturation.
From 0 to 100 for lightness where 100 is full lightness and 0 is no lightness.
Use clr_extract()
if you are planning to extraction multiple components.
Numeric vector of values.
Other Extraction:
clr_extract()
,
clr_extract_chroma()
,
extract_rgba()
clr_extract_hue(rainbow(100), "HSL")
clr_extract_saturation(rainbow(100))
clr_extract_lightness(rainbow(100))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.