Note: the colors may appear not distingushable in the html version,
but they always work fine in console.
print_color(c("red", "navy", "pink", "#E58700", "limegreen"))
#>
#> ------ c red navy pink #E58700 limegreen ------
#>
print_color(c("red", "navy", "pink", "#E58700", "limegreen"),
type = "r")
#>
#> ------ c red navy pink #E58700 limegreen ------
#> red
#> navy
#> pink
#> #E58700
#> limegreen
print_color(palette(rainbow(6)), blank.len = 1)
#>
#> ------ palette rainbow(6) ------
#>
print_color(palette(rainbow(6)), type = 'r')
#>
#> ------ palette rainbow(6) ------
#> red
#> yellow
#> green
#> cyan
#> blue
#> magenta
p1 <- ggplot(mpg) +
geom_point(aes(displ, cyl, color = manufacturer))
print_color(p1)
print_color(p1, type = 'r')