hsv2col {jamba} | R Documentation |
Convert HSV matrix to R color
Description
Converts a HSV color matrix to R hex color
Usage
hsv2col(hsvValue, ...)
Arguments
hsvValue |
|
... |
additional arguments are ignored. |
Details
This function augments the grDevices::hsv()
function in that it handles
output from grDevices::rgb2hsv()
or col2hsv()
, sufficient to
run a series of conversion functions, e.g. hsv2col(col2hsv("red"))
.
This function also maintains alpha transparency, which is not maintained
by the grDevices::hsv()
function.
Value
character
vector of R colors.
See Also
Other jam color functions:
alpha2col()
,
applyCLrange()
,
col2alpha()
,
col2hcl()
,
col2hsl()
,
col2hsv()
,
color2gradient()
,
fixYellow()
,
fixYellowHue()
,
getColorRamp()
,
hcl2col()
,
hsl2col()
,
isColor()
,
kable_coloring()
,
makeColorDarker()
,
rainbow2()
,
rgb2col()
,
setCLranges()
,
setTextContrastColor()
,
showColors()
,
unalpha()
,
warpRamp()
Examples
# start with a color vector
# red and blue with partial transparency
colorV <- c("#FF000055", "#00339999");
# confirm the hsv matrix maintains transparency
col2hsv(colorV);
# convert back to the original color
hsv2col(col2hsv(colorV));