Skip to contents

[palette_gen()] generates a color palette and let you choose whether continuous or discrete. [palette_gen_categorical()] and [palette_gen_sequential()] generates respectively discrete and continuous palettes.

Usage

palette_gen(palette, type, direction = 1, ...)

palette_gen_categorical(palette = "cat_5_main", direction = 1)

palette_gen_sequential(palette = "cat_5_main", direction = 1, ...)

Arguments

palette

Palette name from [palette()].

type

"categorical" or "sequential" or "divergent".

direction

1 or -1; should the order of colors be reversed?

...

Additional arguments to pass to [colorRampPalette()] when type is "continuous".