| fixYellowHue | R Documentation |
Fix yellow color hue to be less green than default "yellow"
fixYellowHue(HCL, Hrange = c(80, 90), Hshift = -15, ...)
HCL |
numeric matrix with HCL color values, as returned by |
Hrange |
numeric vector whose range defines the region of hues
to be adjusted. By default hues between 80 and 90 are adjusted. If
NULL, |
Hshift |
numeric value length one, used to adjust the hue of colors
within the range |
... |
additional arguments are ignored. |
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.
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.
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()
yellows <- vigrep("yellow", grDevices::colors());
yellowsHCL <- col2hcl(yellows);
fixedYellowsHCL <- fixYellowHue(yellowsHCL);
fixedYellows <- hcl2col(fixedYellowsHCL);
showColors(list(yellows=yellows,
fixedYellows=fixedYellows));
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.