R/customPalette.R

#' Custo color palette
#'
#' @param color a color that is in the palette
#' @param full_palette to export full palette enter 'yes'
#'
#' @return either one color, or the full palette
#' @examples
#' customPalette("blue")
#' cusomtPalette("yes")
#' @export
customPalette <- function (color, full_palette = "no") {
  if(full_palette == "yes"){
    return(c("#183661", "#1c4b82", "#dd6b4d", "#dae1e7"))
  } else {
    colors <- c(darkblue = "#183661", blue = "#1c4b82", orange = "#dd6b4d", grey = "#dae1e7")
    colors[color]
  }
}
wohlfeila/randompersonalthings documentation built on Feb. 24, 2020, 12:57 a.m.