scales (version 1.3.0)

alpha: Modify colour transparency

Description

Vectorised in both colour and alpha.

Usage

alpha(colour, alpha = NA)

Arguments

colour

colour

alpha

new alpha level in [0,1]. If alpha is NA, existing alpha values are preserved.

Examples

Run this code
alpha("red", 0.1)
alpha(colours(), 0.5)
alpha("red", seq(0, 1, length.out = 10))
alpha(c("first" = "gold", "second" = "lightgray", "third" = "#cd7f32"), .5)

Run the code above in your browser using DataCamp Workspace