Built on the col2hex() function from the gplot package by Tal Galili with added error handling
col2hex2(cname)
cname | character string name of a built-in r color |
---|
character string with hex code
col2hex("firebrick4")#> Error in col2hex("firebrick4"): could not find function "col2hex"