biopalette logo

biopalette

Image-Inspired Color Palettes for Biomedical Visualization

R-CMD-check Lifecycle

๐Ÿ“š Documentation โ€ข ๐Ÿ’ฌ Issues โ€ข ๐ŸŽจ Tessera โ€ข ๐Ÿงช Palette Lab


Languages: English | ็ฎ€ไฝ“ไธญๆ–‡


Overview

biopalette is an R package providing image-inspired color palettes for biomedical visualization.

Every palette begins with a real image โ€” a film still, a scientific figure, an artwork โ€” and is translated into a reproducible color system. The source is always documented: where the colors came from, what they mean, and when to use them.

library(biopalette)

get_palette("babel", n = 5)
get_palette("three_body")
get_palette("walter_white", type = "diverging")

preview_palette("gene_red")
palette_gallery()

# Discrete and continuous ggplot2 scales
scale_color_biopalette("three_body")
scale_fill_biopalette_gradient("mitonuclear_blue")

Installation

# Development version
devtools::install_github("evanbio/biopalette")

Requires: R โ‰ฅ 4.1.0


Palettes

Each name links to its source page โ€” source image, color table, and intended use.

Name Type Colors Recommended use Source
gene_red Qualitative 2 Emphasized signal versus a dark or neutral counterpart Better Call Saul โ€” Gene Takavicโ€™s red coat
walter_white Diverging 5 Signed continuous values around a neutral center Breaking Bad โ€” desert to sky
walter_white2 Qualitative 5 Up to five unordered groups Breaking Bad โ€” muted earth tones
walter_white3 Diverging 5 Warm-register signed continuous values Breaking Bad โ€” warm counterpart
babel Qualitative 21 Many categorical groups with labels or position support Pan-cancer myeloid atlas (Cell, 2021) โ€” 22 cell types, 21 voices
bcell_atlas Qualitative 7 Four-to-seven categorical groups with direct labels or position support Pan-cancer B-cell atlas (Cell, 2024) โ€” graphical abstract
bcell_atlas2 Diverging 5 Signed change between warm and cool biological states Pan-cancer B-cell atlas (Cell, 2024) โ€” IgA to IgG shift
bcell_clusters Qualitative 20 Many labeled categorical groups with position or faceting support Pan-cancer B-cell atlas (Cell, 2024) โ€” Figure 1B cluster legend
three_body Qualitative 3 Three groups, lineages, or trajectories Pan-cancer myeloid atlas (Cell, 2021) โ€” three DC trajectories
mitonuclear_blue Sequential 6 Cool low-to-high continuous values Mito-nuclear communication in aging (TIBS, 2022) โ€” young blue
mitonuclear_orange Sequential 6 Warm low-to-high continuous values Mito-nuclear communication in aging (TIBS, 2022) โ€” aged orange
heat_light Qualitative 2 Paired categories or experimental conditions Bond ampholysis (Nature, 2024) โ€” heat and light turn radicals into an ion pair
tam_pastel Qualitative 6 Four-to-six categorical groups on light backgrounds Pan-cancer myeloid atlas (Cell, 2021) โ€” soft TAM states
cancer_mosaic Qualitative 15 Ten-to-fifteen categories with labels or position support Pan-cancer myeloid atlas (Cell, 2021) โ€” cancer-type mosaic
lactate_steps Qualitative 5 Five discrete workflow stages or study groups Lactate metabolism and immunotherapy (JECCR, 2024) โ€” five study stages

From Palette to Figure

biopalette provides the R interface for retrieving and applying image-inspired palettes. Tessera documents their source images, example data, and reproducible R figure recipes. Palette Lab keeps the data and graphical structure fixed while comparing palette behavior across 17 graphical contexts. The overview and panels below are rendered from Palette Lab; Tessera links provide the corresponding figure recipes and data context.

Palette Lab overview showing representative graphical contexts

The same palette can behave differently as points, lines, filled regions, heatmap cells, set overlaps, survival curves, or genome-wide signals. These examples show the kinds of figures available through the Tessera recipes and the corresponding palette comparisons in Palette Lab.

Grouped scatter plot using babel
Grouped scatter ยท babel
Grouped line chart using walter_white2
Multi-line comparison ยท walter_white2
Correlation heatmap using walter_white
Correlation heatmap ยท walter_white
Eye color composition by hair color using lactate_steps
Eye color composition by hair color ยท lactate_steps
Kaplan-Meier survival curve using heat_light
Kaplanโ€“Meier survival curve ยท heat_light
Manhattan plot using cancer_mosaic
Manhattan plot ยท cancer_mosaic

Function Reference

๐ŸŽจ Palette Access (4)
๐Ÿ”ง Palette Management (3)
๐Ÿ“Š ggplot2 Scales (6)
๐Ÿ”ต Color Utilities (2)

License

MIT License ยฉ 2025โ€“2026 Yibin Zhou

Made with care by Yibin Zhou