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.
Note
Default text.color
uses black_or_white()
to ensure enough
contrast. Default for use.names
depends on number of columns in the
grid, indexes are used when columns are seven or more.