vibrant_color_by_hue: Get vibrant reference color for a given HCL color hue

vibrant_color_by_hueR Documentation

Get vibrant reference color for a given HCL color hue

Description

Get vibrant reference color for a given HCL color hue

Usage

vibrant_color_by_hue(h, C = 60, S = 100, L = 50)

Arguments

h

numeric color hue in the range c(0, 360).

C, S, L

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.

Details

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.

Value

character vector of colors for each hue h.

See Also

Other colorjam assignment: col_div_xf(), col_linear_xf(), group2colors(), matrix2heatColors(), rainbowJamMulti(), vals2colorLevels()


jmw86069/colorjam documentation built on Dec. 16, 2024, 8:02 a.m.