tcolor: Make transparent color

View source: R/tcolor.R

tcolorR Documentation

Make transparent color

Description

Makes a color represented by a word ("green") or hex code ("#4FFF33) transparent.

Usage

tcolor(color, alpha)

Arguments

color

A color (e.g., "green", "#4FFF33)

alpha

The transparency level (0-1; 0=invisible, 1=opaque)

Value

A color with transparency

Examples

# Plot using transparent red
plot(1:10, 1:10, col=tcolor("red", alpha=0.4))

cfree14/freeR documentation built on Aug. 22, 2023, 11:12 p.m.