R/hana_color_palette.R

Defines functions hana_color_palette

Documented in hana_color_palette

hana_color_palette <-
function(num_colors,palette_type=1) {
  
  #hana's color palette
  corp_palette <- c("#002636", #Midnight
                    "#4C6672", #Tide
                    "#9A502F", #Rust
                    "#617560", #Cypress
                    "#F4F3F1", #Snowbound
                    "#D2DEE0", #Tide Light
                    "#ECD0BB", #Rust Light
                    "#D7DCCC", #Cypress Light
                    "#DFB868" #Aspen
                    )
  
  #by default (1) create a continuous palette, otherwise create distinct  
  
  if (palette_type==1)
  {
    #create a color palette from Midnight to Snowbound
    colfunc <- colorRampPalette(c("#002636","#F4F3F1"))
    my.palette <- colfunc(num_colors)
    my.palette
  }
  else
  {
    my.palette=corp_palette[1:num_colors]
    my.palette
  }
  
}
gottalottasoul/RiHana documentation built on Aug. 7, 2020, 3:22 p.m.