Convert a color in hexadecimal format to RGB format.
Usage
Hex2Rgb(hex.col = NULL, alpha.bln = FALSE)
Arguments
- hex.col
<charcater>: a character of the color's hexadecimal code.
- alpha.bln
<logical>: whether the alpha layer should be returned. (Default FALSE)
Value
An integer vector of the color's RGB code.
Examples
Hex2Rgb("#ebb0107f",alpha.bln=TRUE)
#> red green blue alpha
#> 235 176 16 127