R/is_color.R

Defines functions is_color

# Helper function to check if a character represents a color
#' @importFrom grDevices colors
is_color <- function(x) {
  x %in% colors() | grepl("^#[0-9A-Fa-f]{6}$", x)
}

Try the funkyheatmap package in your browser

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

funkyheatmap documentation built on April 11, 2025, 5:39 p.m.