getColors: Get N Colors

getColorsR Documentation

Get N Colors

Description

Creates n colors from specific palette

Usage

getColors(palette, n, rm = NULL)

Arguments

palette

A string that indicates the name of the palette.

n

An integer that specifies the number of colors to be generated.

rm

An integer vector that specifies the index of colors to be removed.

Details

Currently, only the palette 'Set1' is implemented in this function.

'Set1' palette in the package RColorBrewer originally has 9 colors, but we delete the yellow color (the 6th one) since it is too much vibrant.

If n is larger than the mamixum number of colors in the palette, the function will repeat the palette until n colors is created.

Examples

getColors('Set1', 10)

schoi355/gmwm documentation built on April 11, 2022, 1:21 a.m.