This function converts the color scheme to use a subset of hues.
get_color_subset
maps the the angle to be center
when 0 and 180
and stretch to center - width
at 90 to center + width
as 270.
Usage
get_color_subset(center, width, angle, percentage)
Arguments
- center
Center hue angle [0, 360] for the color scheme.
- width
Width in angles from center to edge for hue values.
- angle
Angle in degrees [0, 360]. Closely matches hue in HCL.
- percentage
Percent [0, 100]. Closely matches chroma in HCL.
Value
Hex code for a color value.
Examples
get_color_subset(90, 30, 90, 100)
#> [1] "#ABE894"
get_color_subset(180, 90, 270, 80)
#> [1] "#CCD188"