Print out the colors used by a literal vector, a palette, or a ggplot object

print_color(x, type = "mosaic", blank.len = 3)

Arguments

x

A literal vector, a palette, or a ggplot object

type

A character. The style of printing. The default is mosaic. It should be one of the mosaic, ribbon, or m, r

blank.len

A integer. The length of color mosaic. The default value is 3.

Examples

print_color(colors(), type = "mosaic", blank.len = 3)
#> #> ------ colors ------ #>
print_color(palette(), type = "ribbon")
#> #> ------ palette ------ #> black #> #DF536B #> #61D04F #> #2297E6 #> #28E2E5 #> #CD0BBC #> #F5C710 #> gray62