Skip to contents

Convert a color in hexadecimal format.

Usage

Col2Hex(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

A character of the color's hexadecimal code.

Details

Col2Hex

Examples

Col2Hex(c(43.8,0.873,0.492,0.498),alpha.bln=TRUE)
#> [1] "#61d04fff" "#ffffff00" "#ffffff00" "#ffffff00"