transparent: transparent

Description Usage Arguments Details Value See Also Examples

View source: R/color.R

Description

Given a color, return a transparent one

Usage

1
transparent(col, amount=0.5)

Arguments

col

(color) The original color. Might be specified as a color name or a "#RRGGBB(AA)" hex color definition.

amount

(number, [0-1]) The amount of transparency. 0 for completely visible, 1 for completely transparent. (Defaults to 0.5).

Details

Very simple utility function to create transparent colors. Given a color, it transforms it to rgb space, adds a set amount to all chanels and transforms it back to a color.

Value

A transparent color

See Also

lighter

Examples

1
2
3
4
 
transparent("red")
transparent("#333333")
 

karyoploteR documentation built on Nov. 8, 2020, 5:52 p.m.