ggspectra (version 0.3.1)

color_chart: Create a color checker chart

Description

Color-checker-chart ggplot labelled with color names or with indexes of the colors in the vector passed as first argument.

Usage

color_chart(colors = grDevices::colors(), ncol = NULL,
  use.names = NULL, text.size = 2, text.color = NULL,
  grid.color = "white")

Arguments

colors

character A vector of color definitions.

ncol

integer Number of column in the checker grid.

use.names

logical Force use of names or indexes.

text.size

numeric Size of the text labels drawn on each color tile.

text.color

character Color definition, used for text on tiles.

grid.color

character Color definition, used for grid lines between tiles.

Examples

Run this code
# NOT RUN {
color_chart()
color_chart(grep("dark", colors(), value = TRUE), text.size = 3.5)

# }

Run the code above in your browser using DataLab