tb_palette: Generate n colors from a mycolorsTB palette

View source: R/classicTB.R

tb_paletteR Documentation

Generate n colors from a mycolorsTB palette

Description

Uses color interpolation to create a custom number of colors from a given palette.

Usage

tb_palette(n, palette_name = "classicTB")

Arguments

n

The number of colors to generate.

palette_name

The name of the palette to use ("mycolors", "classicTB", or "pathogenomics").

Value

A character vector of n hex color codes.

Examples

# Generate 20 colors from the 'classicTB' palette
my_custom_colors <- tb_palette(20, "classicTB")
plot(1:20, 1:20, col = my_custom_colors, pch = 19, cex = 3)

mycolorsTB documentation built on Aug. 8, 2025, 6:35 p.m.