showPalette: Displays a color palette

View source: R/showPalette.R

showPaletteR Documentation

Displays a color palette

Description

Displays a color palette and color details.

Usage

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)

KevCaz/graphicsutils documentation built on Sept. 16, 2022, 10:05 a.m.