transparent: transparent

View source: R/color.R

transparentR Documentation

transparent

Description

Given a color, return a transparent one

Usage

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

 
transparent("red")
transparent("#333333")
 

bernatgel/karyoploteR documentation built on Feb. 1, 2024, 11:48 p.m.