palette255: Expand RColorBrewer palettes

View source: R/palette255.R

palette255R Documentation

Expand RColorBrewer palettes

Description

Expands palettes into 255 colors for plot_genes and plot_volcano

Usage

palette255(palette, ramp = TRUE)

Arguments

palette

RColorBrewer palette name or "RdGn" for Red-Green color scale.

ramp

use colorRampPalette, default returns 255 colors

Value

A vector of 255 colors, diverging palettes are reversed

Author(s)

Chris Stubben

Examples

x <- palette255("RdGn")
plot(c(1,256),c(0,3), type = "n", axes = FALSE,  xlab="", ylab="")
i <- 1:255
rect(i, 1, i+1, 2, col=x, border=NA)

HuntsmanCancerInstitute/hciR documentation built on March 26, 2024, 3:09 a.m.