R/colorjam-presets.R
vibrant_color_by_hue.Rd
Get vibrant reference color for a given HCL color hue
vibrant_color_by_hue(h, C = 60, S = 100, L = 50)
numeric
color hue in the range c(0, 360)
.
numeric
values used during the color conversion:
C
is the intermediate HCL color chroma
S
is the HSL color saturation
L
is the HSL lightness
additional arguments are ignored.
character
vector of colors for each hue h
.
This function converts each h
HCL hue to a hex color using
jamba::hcl2col()
. This hex color is converted to HSL color
space using jamba::col2hsl()
, so the color saturation and
lightness can be adjusted to full saturation without
going outside the HCL color gamut. This HSL color is converted
back to hex color format.
The reason for the two-step conversion is to honor the HCL color hue, which is not the same numeric value as used by the HSL color space.
Other colorjam assignment:
col_div_xf()
,
col_linear_xf()
,
group2colors()
,
matrix2heatColors()
,
rainbowJamMulti()
,
vals2colorLevels()