| unalpha | R Documentation |
Remove alpha transparency from colors
unalpha(x, keepNA = FALSE, ...)
x |
|
keepNA |
|
... |
additional arguments are ignored. |
This function simply removes the alpha transparency from
R colors, returned in hex format, for example "#FF0000FF"
becomes "#FF0000", or "blue" becomes "#0000FF".
It also silently converts R color names to hex format, where applicable.
character vector of R colors in hex format.
Other jam color functions:
alpha2col(),
applyCLrange(),
col2alpha(),
col2hcl(),
col2hsl(),
col2hsv(),
color2gradient(),
fixYellow(),
fixYellowHue(),
getColorRamp(),
hcl2col(),
hsl2col(),
hsv2col(),
isColor(),
kable_coloring(),
makeColorDarker(),
rainbow2(),
rgb2col(),
setCLranges(),
setTextContrastColor(),
showColors(),
warpRamp()
unalpha(c("#FFFF00DD", "red", NA, "#0000FF", "transparent"))
unalpha(c("#FFFF00DD", "red", NA, "#0000FF", "transparent"), keepNA=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.