distinctColorPalette: Generate optimally distinct color palettes

View source: R/distinctColorPalette.R

distinctColorPaletteR Documentation

Generate optimally distinct color palettes

Description

distinctColorPalette generates an attractive palette of random colors.

Usage

distinctColorPalette(count = 1, seed = NULL, darken = 0)

Arguments

count

Integer, number of colors (>= 1). May be ineffective for count > 40.

seed

Integer, seed number to produce repeatable palettes.

darken

Numeric specifying the amount of darkening applied to the color palette. See colorspace::darken. Negative values will lighten the palette.

Details

Adapted from the randomcoloR package https://cran.r-project.org/package=randomcoloR.

Value

distinctColorPalette returns a character vector of count optimally distinct colors in hexadecimal codes.

Examples

distinctColorPalette()

HYPEtools documentation built on Sept. 11, 2024, 8:34 p.m.