Skip to contents

This function generates a second function, for use in the 'ggplot' scales.

Usage

generate_pal(palette, n, reverse = FALSE)

Arguments

palette

Palette to use. One of 'complete', 'main', 'accent', or 'rainbow_12_bit'.

n

Number of colours wanted from palette.

reverse

Should the palette be reversed? Either 'TRUE' or 'FALSE'.

Value

A palette-generating function.

Details

This function is slightly modified from a 2022 blog post by Nicola Rennie.