Skip to contents

Image-Inspired Color Palettes for Biomedical Visualization

CRAN status R-CMD-check Lifecycle


[!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.

Installation

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

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

Quick Start

library(biopalette)

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

preview_palette("gene_red")
palette_gallery()

scale_color_biopalette("three_body")
scale_fill_biopalette_gradient("mitonuclear_blue")

Palettes

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)
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)
heat_light Qualitative 2 Paired categories or experimental conditions Bond ampholysis (Nature, 2024)
tam_pastel Qualitative 6 Four-to-six categorical groups on light backgrounds Pan-cancer myeloid atlas (Cell, 2021)
cancer_mosaic Qualitative 15 Ten-to-fifteen categories with labels or position support Pan-cancer myeloid atlas (Cell, 2021)
lactate_steps Qualitative 5 Five discrete workflow stages or study groups Lactate metabolism and immunotherapy (JECCR, 2024)
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

Function Areas

Area Functions
Palette access get_palette(), palette_info(), list_palettes(), palette_gallery()
Palette management create_palette(), remove_palette(), preview_palette()
ggplot2 scales scale_color_biopalette(), scale_fill_biopalette(), and gradient variants
Color utilities hex2rgb(), rgb2hex()

Documentation

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.

Palette Lab overview showing representative graphical contexts

The panels below are rendered from Palette Lab with fixed data and figure structure. Each Tessera link provides the corresponding reproducible figure recipe and data context.

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

License

MIT License © 2025–2026 Yibin Zhou