Skip to contents

Convert a color in RGB format to hexadecimal format.

Usage

Rgb2Hex(rgb.col = NULL, alpha.bln = FALSE)

Arguments

rgb.col

<integer>: an integer of the color's RGB code.

alpha.bln

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

Value

A character of the color's hexadecimal code.

Details

Rgb2Hex

Examples

Rgb2Hex(c(235,176,16,127),alpha.bln=TRUE)
#> [1] "#ebb0107f"