as.rgb {RIbench}R Documentation

Convert color-names or RGB-code to possibly semi-transparent RGB-code.

Description

Function takes the name of a color and converts it into the rgb space. Parameter "alpha" allows to specify the transparency within [0,1], 0 meaning completey transparent and 1 meaning completey opaque. If an RGB-code is provided and alpha != 1, the RGB-code of the transparency adapted color will be returned.

Usage

as.rgb(col = "black", alpha = 1)

Arguments

col

(character) name of the color to be converted/transformed into RGB-space (code). Only those colors can be used which are part of the set returned by function colors(). Defaults to "black".

alpha

(numeric) value specifying the transparency to be used, 0 = completely transparent, 1 = opaque.

Value

RGB-code

Author(s)

Andre Schuetzenmeister andre.schuetzenmeister@roche.com


[Package RIbench version 1.0.2 Index]