####----- Default GGplot Colours Function -----####

gg_color_hue <- function(n)
{
  # default colour blind palettes
  cblind_palette = c("#88CCEE", "#CC6677", "#DDCC77", "#117733", "#332288", "#AA4499", "#44AA99", "#999933", "#882255", "#661100", "#6699CC", "#888888")

  # append ggplot colours if groups goes above colour blind palette length
  if (n <= length(cblind_palette))
  {
    return(cblind_palette[1:n])
  }
  else
  {
    nn = n - length(cblind_palette)
    hues = seq(15, 375, length = nn + 1)
    return(append(cblind_palette,hcl(h = hues, l = 65, c = 100)[1:nn]))
  }
}

