rainbow: Create a vector of a rainbow of colors

View source: R/colorVectors.R

rainbowR Documentation

Create a vector of a rainbow of colors

Description

rainbow is useful for getting a set of colors for graphs when you need a LOT of colors; there are prettier and more easily distinguishable options if you only have a couple of comparisons.

Usage

rainbow(ncolors)

Arguments

ncolors

number of colors desired

Value

a character vector of colors

Examples

# Create a rainbow of 10 colors.
rainbow(10)

# Try using scales::show_col() to visualize the colors, ex:
scales::show_col(rainbow(10))


shirewoman2/Consultancy documentation built on Feb. 18, 2025, 10 p.m.