tCol: Create colors with transparency

Description Usage Arguments Examples

View source: R/tCol.R

Description

This function easily creates transparent colors providing a color name and the desired proportion of transparency

Usage

1
tCol(color, trans = 50, name = NULL)

Arguments

color

character vector with the names or codes of the original colors.

trans

percentage of transparency to apply to the colors (0 to 100). If a unique value is provided, the same percentage of transparency will be applied to all the colors. If it is a vector of the same length as color, a given transparency will be applied to each color.

name

optional name to give to the resulting colors.

Examples

1
2
3
plot(rnorm(1:100), rnorm(1:100), pch = 16, cex = 2, col = tCol("black", 70))
points(rnorm(1:100), rnorm(1:100), pch = 16, cex = 2, col = tCol("red", 40))
points(rnorm(1:100), rnorm(1:100), pch = 16, cex = 2, col = tCol("blue", 60))

aspillaga/fishtrack3d documentation built on Oct. 17, 2018, 11:12 p.m.