Fix yellow color to be less green than default "yellow"
fixYellow(col, Hrange = c(70, 100), Hshift = -20, fixup = TRUE, ...)
R color, either in hex color format or using values from
colors()
.
numeric vector whose range defines the region of hues
to be adjusted. By default hues between 80 and 90 are adjusted. If
NULL, HCL
is return unchanged.
numeric value length one, used to adjust the hue of colors
within the range Hrange
. If NULL, HCL
is return unchanged.
additional arguments are passed to col2hcl()
, and
hcl2col()
.
returns a vector of R colors the same length as input col
.
In the event col
, Hrange
, or Hshift
have length 0, or if any
step in the conversion produces length 0, then the
original col
is returned.
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 col
, Hrange
, or Hshift
are length 0, the original
col
is returned unchanged.
Other jam practical functions:
breakDensity()
,
checkLightMode()
,
check_pkg_installed()
,
colNum2excelName()
,
color_dither()
,
diff_functions()
,
exp2signed()
,
fileInfo()
,
getAxisLabel()
,
handleArgsText()
,
heads()
,
isFALSEV()
,
isTRUEV()
,
jamba
,
jargs()
,
kable_coloring()
,
lldf()
,
log2signed()
,
make_html_styles()
,
make_styles()
,
match_unique()
,
mergeAllXY()
,
middle()
,
minorLogTicks()
,
newestFile()
,
printDebug()
,
renameColumn()
,
rmInfinite()
,
rmNAs()
,
rmNA()
,
rmNULL()
,
sclass()
,
sdim()
,
setPrompt()
Other jam color functions:
alpha2col()
,
applyCLrange()
,
col2alpha()
,
col2hcl()
,
col2hsl()
,
col2hsv()
,
color2gradient()
,
fixYellowHue()
,
getColorRamp()
,
hcl2col()
,
hsl2col()
,
hsv2col()
,
isColor()
,
kable_coloring()
,
makeColorDarker()
,
make_html_styles()
,
make_styles()
,
rgb2col()
,
setCLranges()
,
setTextContrastColor()
,
showColors()
,
unalpha()
,
warpRamp()
yellows <- vigrep("yellow", colors());
fixedYellows <- fixYellow(yellows);
showColors(list(yellows=yellows,
fixedYellows=fixedYellows));