Design language
The colors, typefaces, and components that the TreeTime apps and docs share with the other sites and tools of the lab.
The design language carries the look of the lab site, neherlab.org, into the apps and the docs of the lab: serif headings, dark red titles, blue links, and a monospace wordmark. The design package @neherlab/design (packages/design) holds it: the tokens, a theme for each kind of site, the fonts, and the React components. TreeTime is its first user, and nothing in the package depends on TreeTime, so the other sites and tools of the lab can use it.
Two registers
The same tokens serve two kinds of pages:
- Sites and docs, where people read: headings in Source Serif 4, page titles in lab red, body text in IBM Plex Sans, lines of at most about 70 characters, and sentence case for every title
- Apps, where people work with data: surfaces, lines, and text in grays without hue, one blue for actions, links, focus, and selection, IBM Plex Sans at 14 px on a dense grid, and lab red only in the wordmark of the lab
Principles
- Red names, blue acts. Lab red marks identity: page titles and the
@of the lab wordmark. Blue marks everything a person can act on. Neither color signals a state: errors, warnings, and success have their own colors and always come with an icon or a word - Grays have no hue. No tool takes a theme from its name or its domain, so the tools of the lab look related instead of each having its own color
- Data colors stay apart. Charts use Paul Tol’s “bright” scheme for color-blind readers, or the convention of their domain, such as the Nextstrain colors in an Auspice view; never the interface blue or the status colors
- Serif for headings, sans for work, mono for what a person types. IBM Plex Mono sets code, commands, file names, sequences, and wordmarks; a tool’s wordmark is its command, such as
treetime - Borders group, one shadow lifts. Panels and tables have hairline borders; only menus, popovers, dialogs, and toasts cast a shadow
- Motion answers. Transitions of 120 ms show a change that a person caused, and reduced-motion settings turn them off
- Accessible in both themes. Text keeps a contrast of at least 4.5:1, and control outlines, focus rings, and chart marks at least 3:1, in the light and the dark theme. A test holds every pair to its minimum
Use the package
| Surface | What to import |
|---|---|
| React app with Tailwind CSS | @import "tailwindcss"; @import "@neherlab/design/tailwind.css"; in CSS, import "@neherlab/design/fonts"; in code, components from @neherlab/design/ui/<name> |
| Site without a build step | @neherlab/design/tokens.css, the CSS custom properties of every token |
| Docusaurus | @neherlab/design/docusaurus.css in the custom CSS of the classic theme |
| reveal.js talks | @neherlab/design/reveal.css after a stock reveal.js theme |
| matplotlib figures | matplotlib.style.use("packages/design/matplotlib/neherlab.mplstyle") |
Rust charts (treetime-charts) | palette.rs, generated from the tokens; chart text in IBM Plex Sans |
Colors follow the color scheme of each element: an element with the Tailwind class scheme-light keeps its subtree light inside a dark page, as the Auspice view does, and scheme-dark makes its subtree dark.
Change a token
The token source is packages/design/src/tokens/tokens.ts: every color is a pair of OKLCH values, one for the light and one for the dark theme. After a change, just gen design writes the CSS custom properties (packages/design/src/css/tokens.css), the Tailwind theme (packages/design/src/css/tailwind-theme.css), the matplotlib style, and the chart palette of treetime-charts, and just generated-check fails when a committed copy is stale. just test-ts checks the contrast of every text, control, and chart color in both themes.
The vendored components and the sources they came from are listed in packages/design/src/ui/UPSTREAM.md.
Specimen
The specimen below draws the tokens and the components of the package. The switch shows the light and the dark theme side by side.
Identity
- neherlab@biozentrumLab site, talks, course pages
- treetimeTreeTime app, CLI, and docs
- treeknitTreeKnit app
- pangraphPangraph docs
The wordmark of the lab site reads like a shell prompt: a name, an @, a place. A tool shows its name in the same monospace face, which is also the command that runs it.
Logos follow the lab mark: lines in gray, at most one stroke in coral and one tip in blue.
Color
Each token holds a light and a dark value. Grays have no hue, one blue marks what a person can act on, and lab red marks identity. The contrast column names the weakest pair that a test holds to its WCAG minimum in both themes: 4.5:1 for text, 3:1 for control outlines, focus, and chart marks.
Surfaces
| Token | Use | Light | Dark | Weakest contrast |
|---|---|---|---|---|
| background | Ground of the app and of the docs | #fafafa | #161616 | 3.2 and 3.6 with input |
| card | Panels, tables, articles | #ffffff | #1d1d1d | 3.1 and 6.4 with data-red |
| popover | Menus, popovers, dialogs | #ffffff | #242424 | 5.9 and 6.3 with muted-foreground |
| muted | Hover, tracks, code, secondary buttons | #f2f2f2 | #292929 | 5.3 and 5.9 with muted-foreground |
| selected | Selected rows and items | #e8f1ff | #172d50 | 4.7 and 5.5 with primary |
Text and lines
| Token | Use | Light | Dark | Weakest contrast |
|---|---|---|---|---|
| foreground | Text, headings, values | #181818 | #e8e8e8 | 15.5 and 11.1 with selected |
| muted-foreground | Descriptions, table headers, dates | #656565 | #a4a4a4 | 5.2 and 5.5 with selected |
| border | Lines between rows, panel borders | #e2e2e2 | #313131 | |
| input | Outlines of inputs and checkboxes | #8d8d8d | #6f6f6f | 3.2 and 3.6 with background |
| ring | Keyboard focus | #3070d6 | #73a5f5 | 4.6 and 7.3 with background |
Actions and identity
| Token | Use | Light | Dark | Weakest contrast |
|---|---|---|---|---|
| primary | Primary buttons, links, selection; the link blue of neherlab.org | #2767cc | #73a5f5 | 4.7 and 5.5 with selected |
| brand | Page titles of sites and docs; the @ of a wordmark | #8f1617 | #ea6a64 | 9.2 and 5.5 with card |
| mark-gray | Lines of logos | #787878 | #989898 | |
| mark-coral | One stroke of a logo | #ce5f5f | #e47b79 | |
| mark-blue | One tip of a logo | #3c87a6 | #66a9c6 |
Status
| Token | Use | Light | Dark | Weakest contrast |
|---|---|---|---|---|
| destructive | Errors and destructive actions, with an icon | #c12b09 | #f47c6b | 5.2 and 5.6 with destructive-subtle |
| warning | Warnings, with an icon | #985b0b | #f0ba59 | 5.1 and 8.0 with warning-subtle |
| success | Finished, converged, valid | #21763c | #67cd87 | 5.3 and 7.3 with success-subtle |
Data
| Token | Use | Light | Dark | Weakest contrast |
|---|---|---|---|---|
| data-blue | Paul Tol's bright scheme, first series | #4477aa | #679dd4 | 4.7 and 5.9 with card |
| data-red | Second series; outliers | #ee6677 | #f37986 | 3.1 and 6.4 with card |
| data-green | Third series | #228833 | #59b662 | 4.5 and 6.7 with card |
| data-yellow | Fourth series; label it, below 3:1 on white | #ccbb44 | #d0c053 | |
| data-cyan | Fifth series; label it, below 3:1 on white | #66ccee | #6eccec | |
| data-purple | Sixth series; selection in charts | #aa3377 | #da6ea6 | 6.1 and 5.4 with card |
| data-gray | Seventh series; label it, below 3:1 on white | #bbbbbb | #868686 |
Type
Components
The application register. Each control is a component of the design package on Base UI or React Aria Components, so focus, keyboard use, and screen reader labels come from the library.
Buttons
Text fields
Shown in the run list and in output file names.
Leave empty to estimate the rate from the data.
Enter a whole number of 1 or more.
Selects
Choices
Tabs, badges, states
- Running, iteration 2 of 3
- Finished in 14 s
- Failed: the tree file cannot be read
Notices
Progress
Readouts
- Tree
tree.nwk, 200 tips- Alignment
aln.fasta.xz, 1,701 sites- Model
- GTR, inferred
Command palette CtrlK
Overlays
Navigation
Table
| Node | Date | 90% interval | Mutations | Clade |
|---|---|---|---|---|
| A/Texas/50/2019 | 2019.88 | sampled | 2 | 3C.2a1b.1b |
| NODE_0000142 | 2019.31 | 2019.05 to 2019.58 | 4 | 3C.2a1b.1b |
| A/Hong_Kong/4801/2018 | 2018.97 | sampled | 1 | 3C.3a |
| NODE_0000087 | 2016.42 | 2016.18 to 2016.61 | 3 | 3C.2a |
Application: a TreeTime run
flu/h3n2/200 timetree
Finished- Tree
- tree.nwk
- Alignment
- aln.fasta.xz
- Model
- GTR, inferred
- Coalescent
- Constant, optimized
- Seed
- 1749203
| Node | Date | 90% interval | Mutations | Clade |
|---|---|---|---|---|
| A/Texas/50/2019 | 2019.88 | sampled | 2 | 3C.2a1b.1b |
| NODE_0000142 | 2019.31 | 2019.05 to 2019.58 | 4 | 3C.2a1b.1b |
| A/Hong_Kong/4801/2018 | 2018.97 | sampled | 1 | 3C.3a |
| NODE_0000087 | 2016.42 | 2016.18 to 2016.61 | 3 | 3C.2a |
Site: the lab home page
Pathogen evolution, genomics, and biophysics
We are a research group at the Biozentrum of the University of Basel. We study how pathogens such as HIV, influenza viruses, and bacteria evolve, and we build open tools that follow their spread.
Evolution of bacteria
- horizontal transfer
- pangenomes
- drug resistance
HIV evolution
- evolution within patients
- mutation and recombination
- latent reservoir
Molecular epidemiology
- real-time tracking
- prediction
- antigenic evolution
Theory
- population genetics
- rapid adaptation
- time tree inference
Tools
- TreeTimeTime-scaled phylogenies
- NextcladeClade assignment and quality control
- NextstrainReal-time tracking of pathogen evolution
- PangraphPangenome graphs of bacteria
Recent publications
All publications- Sample title: epistasis shapes the fitness landscape of a virusAuthor A and Author BSample Journal 12, 34517 September 2026
- Sample title: antibody landscapes inform the choice of vaccine strainsAuthor C, Author D, and othersSample Journal 9, 4626 July 2026
Team
- PIName SurnamePrincipal investigator
- SSName SurnameStaff scientist
- PDName SurnamePostdoc
- SDName SurnameSoftware developer