hsv2col | R Documentation |
Converts a HSV color matrix to R hex color
hsv2col(hsvValue, ...)
hsvValue |
HSV matrix, with rownames c("h","s","v") in any order, and optionally "alpha" rowname for alpha transparency. |
This function augments the hsv
function in that it handles
output from 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 hsv
function.
Other jam color functions:
alpha2col()
,
applyCLrange()
,
col2alpha()
,
col2hcl()
,
col2hsl()
,
col2hsv()
,
color2gradient()
,
fixYellowHue()
,
fixYellow()
,
getColorRamp()
,
hcl2col()
,
hsl2col()
,
isColor()
,
kable_coloring()
,
makeColorDarker()
,
make_html_styles()
,
make_styles()
,
rgb2col()
,
setCLranges()
,
setTextContrastColor()
,
showColors()
,
unalpha()
,
warpRamp()
# 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));
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.