Convert color names to hex RGB strings

col2hex(cname)

Arguments

cname

Color name(s)

Value

Character vector giving the hex color code translation of the provided color names.

Author

Gregory R. Warnes

See also

Examples

col2hex(c("red","yellow","lightgrey"))
#> [1] "#FF0000" "#FFFF00" "#D3D3D3"