ArchR-compatible continuous color palettes
palette_continuous.RdReturns a vector of colors for continuous data, matching ArchR's
paletteContinuous() palette definitions. These can be passed to
BPCells::plot_embedding() via colors_continuous, or interpolated
for heatmaps via grDevices::colorRampPalette().
Arguments
- set
(character) Palette name. One of:
"blueYellow"(default for GeneScoreMatrix),"solarExtra"(default for other matrices),"horizon","horizonExtra","sambaNight","whitePurple","whiteBlue","greenBlue","greyMagma","comet","fireworks","beach","coolwarm","purpleOrange".- n
(integer) Number of colors to interpolate. Default is 256.
Details
Palette definitions are taken from ArchR's ColorPalettes.R.
BPCells provides discrete_palette() with the same discrete palettes
as ArchR (stallion, calm, kelly, etc.), but has limited continuous
palettes. This function fills that gap.
ArchR correspondence: paletteContinuous(set = "solarExtra", n = 256)
See also
palette_discrete for discrete palettes
plot_embedding for using palettes in embedding plots