col2hex(rcolor)
Returns a character string of converted hexadecimal colors.
Convert R colors() to Hexadecimal.
col2hex("darkblue") [1] "#00008B" col2hex(c("darkblue", "red")) [1] "#00008B" "#FF0000" cat(paste0(""))
colors
rgb
col2rgb