powered by
Uses color interpolation to create a custom number of colors from a given palette.
tb_palette(n, palette_name = "classicTB")
A character vector of n hex color codes.
The number of colors to generate.
The name of the palette to use ("mycolors", "classicTB", or "pathogenomics").
# 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)
Run the code above in your browser using DataLab