Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

show_colors

Show colors.


Description

Show colors.

Usage

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

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

Broadly Useful Convenient and Efficient R Functions

v0.6.2
GPL-3
Authors
Han-Wu-Shuang Bao [aut, cre]
Initial release
2021-04-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.