alphacol: Colour utilities

Description Usage Arguments Examples

View source: R/colors.R

Description

alphacol adds an alpha value to a colour specification and convert to a hexadecimal colour string.

Usage

1
  alphacol(col, alpha = FALSE)

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

logical value indicating whether the alpha channel (opacity) values should be returned.

Examples

1
2
3
4
5
# Alphas
alphacol('red') # do nothing
alphacol('red', 10)
alphacol('#aabbcc', 5)
alphacol(4, 5)

pkgmaker documentation built on May 19, 2017, 9:52 a.m.

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