treetime
Auf dieser Seite

Design language

The colors, typefaces, and components that the TreeTime apps and docs share with the other sites and tools of the lab.

Diese Seite ist noch nicht übersetzt
Sie wird auf Englisch angezeigt. Einstellungstexte, Hilfetexte und die Befehlszeilenreferenz bleiben auf allen Seiten englisch.

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

SurfaceWhat 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 figuresmatplotlib.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

TokenUseLightDarkWeakest contrast
backgroundGround of the app and of the docs#fafafa#1616163.2 and 3.6 with input
cardPanels, tables, articles#ffffff#1d1d1d3.1 and 6.4 with data-red
popoverMenus, popovers, dialogs#ffffff#2424245.9 and 6.3 with muted-foreground
mutedHover, tracks, code, secondary buttons#f2f2f2#2929295.3 and 5.9 with muted-foreground
selectedSelected rows and items#e8f1ff#172d504.7 and 5.5 with primary

Text and lines

TokenUseLightDarkWeakest contrast
foregroundText, headings, values#181818#e8e8e815.5 and 11.1 with selected
muted-foregroundDescriptions, table headers, dates#656565#a4a4a45.2 and 5.5 with selected
borderLines between rows, panel borders#e2e2e2#313131
inputOutlines of inputs and checkboxes#8d8d8d#6f6f6f3.2 and 3.6 with background
ringKeyboard focus#3070d6#73a5f54.6 and 7.3 with background

Actions and identity

TokenUseLightDarkWeakest contrast
primaryPrimary buttons, links, selection; the link blue of neherlab.org#2767cc#73a5f54.7 and 5.5 with selected
brandPage titles of sites and docs; the @ of a wordmark#8f1617#ea6a649.2 and 5.5 with card
mark-grayLines of logos#787878#989898
mark-coralOne stroke of a logo#ce5f5f#e47b79
mark-blueOne tip of a logo#3c87a6#66a9c6

Status

TokenUseLightDarkWeakest contrast
destructiveErrors and destructive actions, with an icon#c12b09#f47c6b5.2 and 5.6 with destructive-subtle
warningWarnings, with an icon#985b0b#f0ba595.1 and 8.0 with warning-subtle
successFinished, converged, valid#21763c#67cd875.3 and 7.3 with success-subtle

Data

TokenUseLightDarkWeakest contrast
data-bluePaul Tol's bright scheme, first series#4477aa#679dd44.7 and 5.9 with card
data-redSecond series; outliers#ee6677#f379863.1 and 6.4 with card
data-greenThird series#228833#59b6624.5 and 6.7 with card
data-yellowFourth series; label it, below 3:1 on white#ccbb44#d0c053
data-cyanFifth series; label it, below 3:1 on white#66ccee#6eccec
data-purpleSixth series; selection in charts#aa3377#da6ea66.1 and 5.4 with card
data-graySeventh series; label it, below 3:1 on white#bbbbbb#868686

Type

Source Serif 4Headings and page titles of sites and docs. Variable weight and optical size.
IBM Plex SansInterface and body text everywhere, and the text of charts. Tabular figures line up numbers in tables.
IBM Plex MonoCode, commands, file names, node names, sequences, and wordmarks: text a person types or copies.
60Pathogen evolution
48Waves of immune escape
36Recent publications
24Evolution of bacteria
21TreeTime estimates the dates of ancestors from sampling dates.
18The clock rate comes from a regression of divergence on date.
16Set a clock rate to fix it instead of estimating it.
14Clock rate 3.54 ± 0.21 × 10⁻³ substitutions per site per year
1290% interval from the marginal time posterior

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

Grid points

Tabs, badges, states

v1.0.0-nightlySparseConverged3 warningsFailed
  • Running, iteration 2 of 3
  • Finished in 14 s
  • Failed: the tree file cannot be read

Notices

Progress

Optimizing branch lengths
x
Memory
x

Readouts

Clock rate3.54± 0.21 × 10⁻³subs/site/year
Root date2009.490%: 2008.9 to 2009.8
Tree
tree.nwk, 200 tips
Alignment
aln.fasta.xz, 1,701 sites
Model
GTR, inferred

Command palette CtrlK

Overlays

Table

NodeDate90% intervalMutationsClade
A/Texas/50/20192019.88sampled23C.2a1b.1b
NODE_00001422019.312019.05 to 2019.5843C.2a1b.1b
A/Hong_Kong/4801/20182018.97sampled13C.3a
NODE_00000872016.422016.18 to 2016.6133C.2a

Application: a TreeTime run

treetime

flu/h3n2/200 timetree

Finished
Clock rate3.54± 0.21 × 10⁻³
Root date2009.42008.9 to 2009.8
R² of the regression0.92
Tips2003 without date
Root-to-tip regression
Settings
Tree
tree.nwk
Alignment
aln.fasta.xz
Model
GTR, inferred
Coalescent
Constant, optimized
Seed
1749203
NodeDate90% intervalMutationsClade
A/Texas/50/20192019.88sampled23C.2a1b.1b
NODE_00001422019.312019.05 to 2019.5843C.2a1b.1b
A/Hong_Kong/4801/20182018.97sampled13C.3a
NODE_00000872016.422016.18 to 2016.6133C.2a

Site: the lab home page

neherlab@biozentrum

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

Recent publications

All publications

Team

  • PIName SurnamePrincipal investigator
  • SSName SurnameStaff scientist
  • PDName SurnamePostdoc
  • SDName SurnameSoftware developer
Biozentrum, University of BaselImprint