Learn R Programming

pliman (version 2.1.0)

random_color: Random built-in color names

Description

Randomly chooses single or multiple built-in color names which R knows about. See more at grDevices::colors()

Usage

random_color(n = 1, distinct = FALSE)

Value

A character vector of color names

Arguments

n

The number of color names. Defaults to 1.

distinct

Logical indicating if the colors returned should all be distinct. Defaults to FALSE.

Examples

Run this code
library(pliman)
random_color(n = 3)

Run the code above in your browser using DataLab