Learn R Programming

Durga (version 2.0)

DurgaTransparent: Returns a transparent version of the specified colour(s).

Description

Returns a transparent version of the specified colour(s).

Usage

DurgaTransparent(colour, transparency, relative = FALSE)

Value

A colour or colours that are transparent versions of colour.

Arguments

colour

The R colour (or colours) to be made transparent. May be specified in any way recognised by col2rgb: a colour name, a hexadecimal string such as "#ffbc48" or a positive integer i meaning meaning palette()[i].

transparency

Transparency, from 0, meaning fully opaque, through to 1, which is completely transparent (i.e. invisible).

relative

Determines what happens if colour is already transparent. If relative is FALSE (the default), then the transparency value of colour is ignored and transparency defines the transparency of the returned colour. If TRUE, the existing transparency value is multiplied by transparency.

See Also

Examples

Run this code
transparentPink <- DurgaTransparent("red", 0.8)
transparentPink

Run the code above in your browser using DataLab