highlightCol: add alpha transparency value to a color

Description Usage Arguments Value Author(s) Examples

View source: R/publicUtilities.R

Description

An alpha transparency value can be specified to a color, in order to get better color for background.

Usage

1
highlightCol(col, alpha = 0.5)

Arguments

col

vector of any of the three kinds of R color specifications, i.e., either a color name (as listed by colors()), a hexadecimal string of the form "#rrggbb" or "#rrggbbaa" (see rgb), or a positive integer i meaning palette()[i].

alpha

a value in [0, 1]

Value

a vector of colors in hexadecimal string of the form "#rrggbbaa".

Author(s)

Jianhong Ou

Examples

1
2
    highlightCol(1:5, 0.3)
    highlightCol(c("red", "green", "blue"), 0.3)

motifStack documentation built on July 12, 2017, 2:01 a.m.

Search within the motifStack package
Search all R packages, documentation and source code