R/pillar.R

Defines functions pillar_shaft.palettes_colour

#' @importFrom pillar pillar_shaft
#' @export
pillar_shaft.palettes_colour <- function(x, ...) {
  # Hex codes should always be printed in tibbles.
  op <- options(palettes.print_hex = TRUE)
  on.exit(options(op))
  pillar::new_pillar_shaft_simple(colour_format_symbol(x))
}

Try the palettes package in your browser

Any scripts or data that you put into this service are public.

palettes documentation built on Sept. 11, 2024, 5:57 p.m.