class_color | R Documentation |
Useful for manipulating colors in R.
class_color(
color = character(0),
hue = NULL,
saturation = NULL,
brightness = NULL,
alpha = NULL,
id = character(0)
)
color |
character (R color or hex code) |
hue |
get or set the hue of a color (i.e., the h in the hsv model) |
saturation |
get or set the saturation of a color (i.e., the s in the hsv model) |
brightness |
get or set the brightness of a color (i.e., the v in the hsv model) |
alpha |
get or set the transparency of a color |
id |
character identifier |
class_color object
transparentize
function to return the color with a new transparency (i.e., alpha)
lighten
function to return a lighter color
darken
function to return a darker color
mycolor <- class_color("blue")
mycolor
# Display html hexcode
c(mycolor)
# Set transparency
mycolor@transparentize(.5)
# Lighten color
mycolor@lighten(.5)
# Darken color
mycolor@darken(.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.