From palette to plot with Tessera

Choosing colors is only the beginning of a figure. A useful palette must match the data, remain clear in the intended graphical marks, and fit into code that another person can reproduce.

Tessera brings those steps together. It offers palettes to choose from, datasets to work with, and complete figure recipes to take into R. Palette Lab adds a quick visual way to switch palettes across familiar plot structures.

This article follows the path a reader can take from discovering a palette to using it in a finished R figure.

library(biopalette)
library(ggplot2)

Discover a palette

A Tessera palette page starts with the material needed to make a choice:

Explore the Tessera palette collection, or begin with a few contrasting examples:

The displayed name is the handoff to biopalette:

get_palette("mitonuclear_blue", n = 5)
#> [1] "#EEF4FB" "#D4EBF5" "#A7C2E3" "#5478B7" "#155289"

The complete English source records are also available in the palettes/ directory of the biopalette repository.

Compare it in Palette Lab

A row of swatches does not reveal how colors behave as small points, thin lines, neighboring tiles, or large filled regions. Palette Lab provides a fast way to look beyond the swatch.

Choose a palette and view it across a consistent set of displays, including grouped points, lines, bars, distributions, heatmaps, maps, survival curves, embeddings, volcano plots, and Manhattan plots. The data and graphical structure remain fixed while the colors change, making visual differences easy to inspect.

Open a palette directly in the lab:

When a qualitative palette has fewer colors than a display has groups, the remaining groups stay visible in a neutral color. This makes the palette’s capacity visible without removing observations or recycling category colors.

Palette Lab is a visual overview. When a plot is relevant to your work, follow it into the corresponding Tessera recipe for the R implementation and the reasoning behind it.

Learn from an R recipe

Tessera recipes are complete, working figure examples. Each one is organized around the question the figure answers and the data shape it requires. A recipe typically provides:

Browse recipes by the figure you need:

The emphasis is practical: see the finished figure, understand the choices, and take the R implementation into your own analysis.

Work with the same data

Tessera data pages make the recipe examples inspectable and reusable. Depending on the dataset, a page includes:

Examples range from familiar R datasets to biomedical, economic, weather, and reference data:

Because the data page and recipe are linked, a reader can move from the figure to the exact example data instead of reconstructing an undocumented simulation.

Follow one complete path

Suppose you need a sequential palette for a choropleth map.

1. Read the palette

Open mitonuclear_blue to inspect its source image, six-color sequence, direction, and notes about the lightest classes.

2. Look at the graphical behavior

Open mitonuclear_blue in Palette Lab and inspect the map, heatmap, and other continuous displays.

3. Open the R recipe

The choropleth map recipe explains the input data, geographic join, missing-value treatment, continuous and binned versions, and the choice of a sequential palette.

4. Inspect or download the data

The economy_countries page documents the example variables and provides the CSV used by the recipe.

5. Use the palette in R

The palette name carries directly into biopalette:

ggplot(map_data) +
  geom_sf(aes(fill = value), color = "white", linewidth = 0.2) +
  scale_fill_biopalette_gradient(
    "mitonuclear_blue",
    na.value = "grey85"
  )

The same path works for a diverging quantity. Read walter_white, view it in Palette Lab, open a heatmap recipe, and place the scientific reference at the center in R:

scale_fill_biopalette_gradient(
  "walter_white",
  midpoint = 0
)

Choose where to begin

Tessera helps move from looking at colors to understanding a figure. Palette Lab makes comparison immediate, recipes provide the reproducible R work, and biopalette brings the selected colors into your own data.