The binference design¶
This page is the locked design of the binference documentation site. Josh locked it on
2026-10-27 (issue #99) from the round-2 design sheet; the rounds that led to it are kept in
notes/review/docs-design/. Every number here lives in one place,
docs/_scripts/brand.py,
which draws the marks, writes the theme’s tokens and fills in the tables below; CI fails if
any of them is stale or the served fonts disagree with it. A change to the design changes brand.py first, then this page.
Concept¶
binference infers a population and gives every answer with its uncertainty. The design draws that idea: a population is shown as its posterior draws, never as one histogram; objects and samples are single coral points; bins are square steps.
The mark¶
The mark is a letter b built as a histogram. The tallest bin is the stem. The other bins trace a bowl: a low floor plus a semi-ellipse that spans them exactly. Several posterior draws of the histogram are overlaid as pale fills, so the b is darkest where they agree and its edge steps where they disagree. One line is their mean. An elliptical counter is cut out of the bowl and holds one sample, in coral.
The mark has three cuts, drawn from the same geometry with fewer bins and draws as it
shrinks. The files live in the theme’s static/brand/ folder, which the site theme serves
as _static/brand/:
Cut |
Used at |
Bins |
Draws |
Files |
|---|---|---|---|---|
full |
48 px and up |
10 |
7 |
|
mid |
24 to 47 px |
7 |
4 |
|
tiny |
below 24 px |
5 |
2 |
|
The favicon, favicon.svg, is the smallest cut and follows the browser’s colour scheme.
Rules for the mark:
Draws are always the brand colour and the sample always coral; never swap them.
Never fill the b solid, outline it only, rotate it or redraw it in other hues.
Clear space around the mark is at least a quarter of its height.
The wordmark¶
“binference” is set in Sora at weight 600, lower case. The dot of the i is a measurement
with an error bar, in coral. The lockups hold the wordmark as outlines, so they never depend
on a loaded font: lockup-{light,dark}.svg with the mid cut, for bars and headers, and
lockup-large-{light,dark}.svg with the full cut, for the README and other places where the
mark is at least 48 px tall. The mark and the wordmark share a baseline (their size ratio is
in the table of sizes below).
Colour¶
One brand hue, indigo, is the population: draws, bins, estimates and the mark. Coral is an object or a sample, and nothing else. Neutrals lean toward indigo. Both themes are designed; the dark theme is not an inversion.
Plots are drawn on the light bg in both themes; the dark theme sets each one on a
panel of that colour (--b-figure-ground), so a plot never needs a dark version.
Each contrast is the WCAG ratio against the token named in the last column: surfaces
against the text on them, everything else against the page. Text needs 4.5 (AA), marks and
large text 3; sample is for marks only, and coral text uses sample-text.
Token |
Role |
Light |
Contrast |
Dark |
Contrast |
Read against |
|---|---|---|---|---|---|---|
|
page |
|
15.4 |
|
15.4 |
|
|
panels, code, explainers |
|
14.2 |
|
13.9 |
|
|
hover, selected |
|
13.0 |
|
11.8 |
|
|
hairlines (decorative) |
|
1.3 |
|
1.5 |
|
|
text |
|
15.4 |
|
15.4 |
|
|
secondary text, axes |
|
5.9 |
|
7.2 |
|
|
the population: draws, bins, the mark |
|
6.3 |
|
6.5 |
|
|
links, focus |
|
8.1 |
|
8.4 |
|
|
an object or a sample (marks only) |
|
3.2 |
|
8.0 |
|
|
an object or a sample, as text |
|
5.0 |
|
8.0 |
|
|
top bar and footer, both themes |
|
15.4 |
|
16.1 |
|
|
text on the bar |
|
15.4 |
|
16.1 |
|
|
‘In plain words’ notes |
|
4.9 |
|
8.5 |
|
|
warnings |
|
4.9 |
|
9.3 |
|
|
errors |
|
6.4 |
|
6.6 |
|
|
categories, in this order |
|
|
|||
|
sequential, one hue |
|
|
|||
|
diverging, grey middle |
|
|
The categories were checked on 2026-10-27 with the categorical checks of the dataviz
palette validator, against bg in each theme: lightness band, chroma floor, colour-blind
separation of adjacent pairs, normal-vision separation and contrast with the page. Run it
again when they change. Categories are used in their order and never cycled; more
categories fold into “other” or a separate panel. The sequential and diverging ramps step
monotonically in lightness.
Type¶
Role |
Face |
Weight |
Size |
Line height |
|---|---|---|---|---|
page titles |
Sora |
600 |
32 px |
1.15 |
section headings |
Sora |
600 |
20 px |
1.25 |
running text |
Atkinson Hyperlegible Next |
400 |
16.5 px |
1.6 |
code, numbers in tables |
Atkinson Hyperlegible Mono |
400 |
14 px |
1.5 |
captions |
Atkinson Hyperlegible Next |
400 |
14 px |
1.45 |
subsection headings |
Sora |
600 |
17 px |
1.3 |
minor headings |
Atkinson Hyperlegible Next |
600 |
15 px |
1.3 |
labels (upper case) |
Atkinson Hyperlegible Next |
600 |
12 px |
1.4 |
page titles below 900 px |
Sora |
600 |
28 px |
1.15 |
Atkinson Hyperlegible was designed by the Braille Institute so that letters that look alike
(I l 1, O 0, rn m) stay distinct. All three faces are under the SIL Open Font License and are
kept in the theme’s static/fonts/ (fetched by docs/_scripts/fetch_fonts.py). They have no Greek
letters, so Greek symbols are always written as maths ($\rho$), which MathJax sets in its
own fonts.
Sizes¶
Size |
Value |
Use |
|---|---|---|
|
3 px |
rules marking notes, explainers and the current page |
|
2 px |
focus ring |
|
2 px |
the largest corner radius, on controls only |
|
12 px |
smallest figure text at 390 px wide |
mark : wordmark |
1.45 |
the mark’s height over the wordmark’s font size |
|
30 rem |
the widest a plot is shown |
Drawing rules¶
These rules hold for every figure, explainer and diagram on the site.
Uncertainty is drawn, never hidden. A population is shown as its posterior draws (several pale fills, or a band) with the mean as one line. A bare histogram is never an answer.
Indigo is the population, coral is an object. Draws, bins and estimates are indigo; data points, samples and single objects are coral; the truth is an ink dashed line. Coral marks nothing else.
Bins are steps. Anything binned is drawn as square steps, never smoothed. Smooth curves are only for what is continuous, such as a likelihood or a true density.
Square and flat. Corners are square, rounded at most by
radiuson controls. No gradients, shadows or glows. Hairline rules, not boxes.Words before colour. Direct labels over legends. Hue is never the only signal: use fill and outline, dot and line, dashed and solid. Every figure reads in greyscale.
Readable on a phone. Figure text is at least
figure-textat 390 px wide. A wide figure has a narrow version. Every figure has a caption and real alt text.
Components¶
Top bar in
barin both themes, with the lockup, the sections, search with the/key, the theme toggle and a GitHub link. Below 1080 px the sections leave it for the sidebar (or, on the home page, a menu); below 900 px the sidebar moves into the menu.Sidebar with the section’s pages; the current page carries an
accent-ruleinbrand.“In plain words” note: at most one per Concepts page, marked in
tip, for students.Notes and warnings: an
accent-ruleinbrandorwarnonsurface.Code on
surface, with a language label and a copy button; output joined below it onbg, labelled “output”.Figures: a hairline above the caption; captions in
ink-2.Explainers: on
surfacewith anaccent-ruleinbrandon top, a numbered title (V-n), native controls and a live readout in mono. They are still and complete before JavaScript runs, and respect reduced motion.Pager with the previous and next pages; footer in
bar.Home: the hero is the largest cut with its draws slowly resampling (still under reduced motion), the line “Infer the population, then every object.”, and three paths by the reader’s data.
Accessibility¶
WCAG 2.2 AA in both themes: the contrasts above, a visible focus ring in link, a skip
link, one h1 per page, alt text on every figure, and nothing that moves without a way to
stop it. The final pass checks every page at 390 and 1440 px in both themes.