fixYellowHue: Fix yellow color hue

fixYellowHueR Documentation

Fix yellow color hue

Description

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", HCL is 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, HCL is return unchanged.

Hshift

numeric value length one, used to adjust the hue of colors within the range Hrange. If NULL, HCL is return unchanged.

...

additional arguments are ignored.

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.

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.

See Also

Other jam color functions: alpha2col(), applyCLrange(), col2alpha(), col2hcl(), col2hsl(), col2hsv(), color2gradient(), fixYellow(), getColorRamp(), hcl2col(), hsl2col(), hsv2col(), isColor(), kable_coloring(), makeColorDarker(), make_html_styles(), make_styles(), rgb2col(), setCLranges(), setTextContrastColor(), showColors(), unalpha(), warpRamp()

Examples

yellows <- vigrep("yellow", colors());
yellowsHCL <- col2hcl(yellows);
fixedYellowsHCL <- fixYellowHue(yellowsHCL);
fixedYellows <- hcl2col(fixedYellowsHCL);
showColors(list(yellows=yellows,
   fixedYellows=fixedYellows));


jmw86069/jamba documentation built on March 26, 2024, 5:26 a.m.