get_color_subset: Gets the hex code color from get_color augmented by center...

View source: R/helpers.R

get_color_subsetR Documentation

Gets the hex code color from get_color augmented by center and width.

Description

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)
get_color_subset(180, 90, 270, 80)

WilliamTylerBradley/flowfieldfigments documentation built on May 1, 2022, 6:07 p.m.