Learn R Programming

ympes (version 1.6.0)

plot_palette: Plot a colour palette

Description

plot_palette() plots a palette from a vector of colour values (name or hex).

Usage

plot_palette(values, label = TRUE, square = FALSE)

Value

The input (invisibly).

Arguments

values

[character]

Vector of named or hex colours.

label

[bool]

Do you want to label the plot or not?

If values is a named vector the names are used for labels, otherwise, the values.

square

[bool]

Display palette as square?

Examples

Run this code

plot_palette(c("#5FE756", "red", "black"))
plot_palette(c("#5FE756", "red", "black"), square = TRUE)

Run the code above in your browser using DataLab