Skip to contents

Generate a quick visual preview of one or more ggastrum color palettes. Produces a ggplot2 bar chart showing the palette colors with hex labels. Useful for comparing palettes side-by-side or inspecting interpolation results.

Usage

show_palette(palette = "all", n = 6)

Arguments

palette

Character. One or more palette names to preview: "solaris", "viridis", "inferno", "grayscale", or "doplar". Defaults to "all", which displays every palette.

n

Integer. Number of colors to generate for each palette. Default is 6.

Value

A ggplot2 object. When called interactively, the plot is also printed to the current graphics device.

Examples

if (FALSE) { # \dontrun{
show_palette("solaris", n = 5)
show_palette(c("solaris", "doplar"), n = 7)
show_palette()
} # }