Displays a color palette and information about its colors.

showPalette(
  x = palette(),
  inline = FALSE,
  add_number = TRUE,
  add_codecolor = TRUE,
  cex_num = 1.2
)

Arguments

x

a vector of colors.

inline

a logical. If TRUE, the colors are displayed on a single row.

add_number

a logical. If TRUE, color vector's indices are added.

add_codecolor

a logical. If TRUE, the code color is displayed.

cex_num

the magnification coefficient of the color vector's indices.

Value

The color palette displayed as an invisible output.

Examples

showPalette() showPalette(inline = TRUE)
showPalette(1)
showPalette(sample(1:100, 16), add_number = FALSE, add_codecolor = FALSE)