R/aaa.R

Defines functions check_palette

#' @importFrom rlang check_installed abort
NULL

check_palette <- function(palette, names, call = rlang::caller_env()) {
  if (!(palette %in% names)) {
    abort(
      paste0(
        "Palette not found. Make sure both package and palette ",
        'name are spelled correct in the format "package::palette".'
      ),
      call = call
    )
  }
}
EmilHvitfeldt/paletteer documentation built on Feb. 1, 2024, 3:39 a.m.