Skip to contents

Convert a color in to RGB format.

Usage

Col2Rgb(color.col = NULL, alpha.bln = FALSE)

Arguments

color.col

<charcater>: a vector of the color's present in base R colors().

alpha.bln

<logical>: whether the alpha layer should be returned. (Default FALSE)

Value

An integer vector of the color's RGB code.

Details

Col2Rgb

Examples

Col2Rgb(c("green","red"),alpha.bln=TRUE)
#>       [,1] [,2]
#> red      0  255
#> green  255    0
#> blue     0    0
#> alpha  255  255