Fix yellow color hue to be less green than default "yellow"
Usage
fixYellowHue(HCL, Hrange = c(80, 90), Hshift = -15, ...)Arguments
- HCL
numeric matrix with HCL color values, as returned by
col2hcl(), but requiring only one rowname"H"representing the color hue on a scale of 0 to 360. If input data does not contain numeric values with rowname "H",HCLis return unchanged.- Hrange
numeric vector whose range defines the region of hues to be adjusted. By default hues between 80 and 90 are adjusted. If NULL,
HCLis return unchanged.- Hshift
numeric value length one, used to adjust the hue of colors within the range
Hrange. If NULL,HCLis return unchanged.- ...
additional arguments are ignored.
Value
returns the input HCL data where rowname "H" has hue values
adjusted accordingly. In the event HCL, Hrange, or Hshift have
length 0, the original HCL is returned. If input data does not
meet the expected format, the input HCL is returned unchanged.
Details
This function "fixes" the color yellow, which by default appears green especially when darkened. The effect of this function is to make yellows appear more red, which appears more visibly yellow even when the color is darkened.
This function is intended to be tolerant to missing values. For example if
any of the values HCL, Hrange, or Hshift are length 0, the original
HCL is returned unchanged.
See also
Other jam color functions:
alpha2col(),
applyCLrange(),
col2alpha(),
col2hcl(),
col2hsl(),
col2hsv(),
color2gradient(),
fixYellow(),
getColorRamp(),
hcl2col(),
hsl2col(),
hsv2col(),
isColor(),
kable_coloring(),
makeColorDarker(),
rainbow2(),
rgb2col(),
setCLranges(),
setTextContrastColor(),
showColors(),
unalpha(),
warpRamp()
