ColorRamp palette extrapolating Set1 palette of RColorBrewer package. The original Set1 palette is sampled for 9 colours. This function can have the number of required colours as input parameter; if this does not happen a function is returned.

distinct_palette_few(n = NULL)

Arguments

n

The number of required colours. By default this is NULL.

Value

Either a function that applied to a number returns the required colours, or the actual sampling function.

See also

Examples

distinct_palette_few(2)
#> [1] "#E41A1C" "#999999"