makeTransparent: makeTransparent

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/aveytoolkit_makeTransparent.R

Description

Simple function to make some colors transparent

Usage

1
makeTransparent(alpha = 0.5, ...)

Arguments

alpha

transparency factor in range [0,1]

...

vector or list of colors

Value

a vector of new colors made transparent

Author(s)

Ricardo Oliveros-Ramos

References

http://stackoverflow.com/questions/8047668/transparent-equivalent-of-given-color

See Also

rgb, col2rgb

Examples

1
2
3
4
makeTransparent("red", "blue")
##[1] "#FF00007F" "#0000FF7F"
makeTransparent("red", "blue", alpha=0.8)
## [1] "#FF0000CC" "#0000FFCC"

stefanavey/aveytoolkit documentation built on March 5, 2020, 12:49 a.m.