setAlpha: setAlpha

Description Usage Arguments Value Examples

Description

Set the alpha level of a standard R colour.

Usage

1
setAlpha(col, alpha)

Arguments

col

A character specifying a standard R colour

alpha

A numeric in [0, 1] specifying the alpha level

Value

A character vector with elements of 7 or 9 characters, "#" followed by the red, blue, green and optionally alpha values in hexadecimal (after rescaling to 0 ... 255).

Examples

1
2
3
4
5
6
plot(
  rnorm(10000),
  rnorm(10000),
  pch = 16,
  col = setAlpha("slateblue", 0.2)
)

ram6ler/transparent documentation built on May 26, 2019, 10:03 p.m.