tCol: Create colors with transparency

Description Usage Arguments Examples

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 June 4, 2019, 9:14 a.m.