biopalette logo

biopalette

Image-Inspired Color Palettes for Biomedical Visualization

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


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


[!NOTE] ๐ŸŽ‰ biopalette is on CRAN. install.packages("biopalette") installs the current release, 0.2.2.

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

# Current CRAN release
install.packages("biopalette")

# Development version
# remotes::install_github("evanbio/biopalette")
install.packages("biopalette", repos = c('https://evanbio.r-universe.dev', 'https://cloud.r-project.org'))

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
fargo Qualitative 3 Three groups with a dark anchor and restrained warm accent Fargo โ€” navy, motel-sign teal, and suitcase wine
immune_circuit Qualitative 8 Four parent groups with paired states Chondrosarcoma immune-circuit graphical abstract โ€” paired red, blue, green, and purple
immune_circuit_red Sequential 7 Increasing tumor burden, cytotoxicity, risk, or damage Chondrosarcoma immune-circuit graphical abstract โ€” tumor coral
immune_circuit_green Sequential 7 Increasing immune activation, infiltration, or recovery Chondrosarcoma immune-circuit graphical abstract โ€” T-cell mint
lipid_budding Qualitative 4 Four categorical groups with a balanced coolโ€“warm structure Hepatic ER lipid-droplet budding โ€” DGAT2, DGAT1, Seipin, and FIT2
lipid_budding_blue Sequential 5 Low-to-high continuous values in muted steel blue Hepatic ER lipid-droplet budding โ€” DGAT2 blue
lipid_budding_rose Sequential 5 Low-to-high continuous values in dusty rose Hepatic ER lipid-droplet budding โ€” DGAT1 rose
lipid_budding_orange Sequential 5 Low-to-high continuous values in salmon orange Hepatic ER lipid-droplet budding โ€” Seipin orange
lipid_budding_indigo Sequential 5 Low-to-high continuous values in slate indigo Hepatic ER lipid-droplet budding โ€” FIT2 indigo
cytokine_sensors Qualitative 7 Six neuroimmune outcomes with a neutral cytokine anchor Neuronal cytokine sensing in the CNS (Trends Immunology, 2026)
clone_age Diverging 5 Age- and state-related change around a neutral center Clonal hematopoiesis โ€” mutant-clone yellow to HSC purple
clone_memory Diverging 5 Stimulation, recovery, and clone-state contrasts Epigenetic HSC memory โ€” activated purple to pre-existing cyan
ppi_obligate Qualitative 4 Four members of one assembled complex or system Obligate protein interactions โ€” blue-violet, purple, green, and yellow
ppi_nonspecific Qualitative 2 Two interaction partners, conditions, or cohorts Non-specific protein interactions โ€” purple and green
ppi_transient Diverging 5 Centered interaction scores and signed effects Transient protein interactions โ€” red through neutral to blue

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