enve.col.alpha {enveomics.R}R Documentation

Enveomics: Color Alpha

Description

Modify alpha in a color (or vector of colors).

Usage

enve.col.alpha(col, alpha = 1/2)

Arguments

col

Color or vector of colors. It can be any value supported by col2rgb, such as darkred or #009988.

alpha

Alpha value to add to the color, from 0 to 1.

Value

Returns a color or a vector of colors in hex notation, including alpha.

Author(s)

Luis M. Rodriguez-R [aut, cre]

Examples

# Hexcode for a color by hexcode
enve.col.alpha("#009988", 3/4) # "#009988BF"

# Hexcode for a color by name
enve.col.alpha("white", 1/4) # "#FFFFFF3F"

# Hexcode for a color from other functions
enve.col.alpha(rainbow(3)) # "#FF00007F" "#00FF007F" "#0000FF7F"

[Package enveomics.R version 1.9.1 Index]