njtierney / palap

symmetric (reflective, palindromic) colour palettes (rev(palap) == palap)
Other
18 stars 0 forks source link

Define s3 methods for palap so it can take hex value input #2

Open njtierney opened 5 years ago

njtierney commented 5 years ago

palap.default would behave as follows:

palap(n = 25,
      alpha = NULL,
      begin = 0,
      end = 1,
      direction = 1,
      palette = "lajolla")

But palap.character would take a hex string input:

vec_hex <- c("#EDF8E9", "#BAE4B3", "#74C476", "#31A354", "#006D2C")
palap(hex = vec_hex,
      alpha = NULL,
      begin = 0,
      end = 1,
      direction = 1)

the alternative would be to have another function, palap_hex()