addalpha: addalpha - add transparency info to colorset for plotting

View source: R/addalpha.R

addalphaR Documentation

addalpha - add transparency info to colorset for plotting

Description

addalpha adds transparency information to a vector in R color format

Usage

addalpha(colors, alpha = 1)

Arguments

colors

a hexadecimal string as commonly used in R

alpha

a transparency factor: 0 - completely invisible 1 - fully opaque

Value

a hexadecimal string of length colors

Examples

    library(RColorBrewer)
    set2 <- brewer.pal(5, 'Set2')
    set2.light <- addalpha(set2, alpha=0.5)


theislab/kBET documentation built on Jan. 27, 2024, 9:58 p.m.