show_colors: Show colors.

Description Usage Arguments Value Examples

View source: R/bruceR_stats_06_plot.R

Description

Show colors.

Usage

1
show_colors(colors = see::social_colors())

Arguments

colors

Color names.

e.g.,

  • "red" (R base color names)

  • "#FF0000" (hex color names)

  • see::social_colors()

  • viridis::viridis_pal()(10)

  • RColorBrewer::brewer.pal(name="Set1", n=9)

  • RColorBrewer::brewer.pal(name="Set2", n=8)

  • RColorBrewer::brewer.pal(name="Spectral", n=11)

Value

A gg object.

Examples

1
2
3
4
5
show_colors()  # default is to show see::social_colors()
show_colors("blue")  # blue
show_colors("#0000FF")  # blue (hex name)
show_colors(RGB(0, 0, 255))  # blue (RGB)
show_colors(see::pizza_colors())  # a specific palette

bruceR documentation built on June 22, 2021, 1:06 a.m.