CalCOFI CalCOFI brand v1

calcofi.io brand v1

One source for the theme, the header chrome, the logo, the favicon and the icon set that every CalCOFI product shares โ€” served from https://calcofi.io/brand/v1/. v1 is the brand in force; it is frozen once adopted: token additions are fine, anything that changes how an existing page looks or behaves is v2, and consumers opt in. The rule is checked weekly, not assumed (scripts/check_brand.py).

v1 ยท in forcev2 ยท proposed (the SIO look)

The contract, in one breath

  1. Theme resolution โ€” ?theme=dark|light on any URL โ†’ cookie cc_theme on .calcofi.io โ†’ localStorage.theme โ†’ dark. theme.js sets data-theme / data-bs-theme / data-md-color-scheme on <html> and fires cc:theme; maps, Plotly and Mermaid restyle on it. Never key on prefers-color-scheme.
  2. The header โ€” logo far left โ†’ https://calcofi.io; the product's title beside it โ†’ its own root; the theme toggle at the right shows what a click switches to (a sun while the page is dark, a moon-in-sun while it is light). Where a framework owns the bar (Quarto, pkgdown, mkdocs, bslib) the logo goes in its brand slot and its toggle is bridged โ€” never two bars, never two toggles.
  3. The favicon set, except calcofi4r (hex) and calcofi4py (squircle).
  4. ?tour=off suppresses any guided tour, so live_url?theme=<t>&tour=off is a deterministic screenshot.

Header and release chip

The bar above is the contract's header, drawn by theme.css alone (explicit font, colour, size, so it reads the same inside a Bootstrap page as on a plain one). The chip a product puts beside its title to say which database release it is reading:

release v2026.08.25โ†’ the schema site at that version
<header class="cc-header">
  <a class="cc-home" href="https://calcofi.io" aria-label="CalCOFI.io home">
    <img class="cc-logo-dark"  src="https://calcofi.io/brand/v1/logo_calcofi.svg"       alt="CalCOFI" width="32" height="32">
    <img class="cc-logo-light" src="https://calcofi.io/brand/v1/logo_calcofi_light.svg" alt="CalCOFI" width="32" height="32">
  </a>
  <a class="cc-title" href="./">Product</a>
  <span class="cc-spacer"></span>
  <nav class="cc-links"><a href="โ€ฆ">query</a><a href="โ€ฆ">docs</a></nav>
  <button class="cc-theme-toggle" type="button" aria-label="Toggle dark / light theme">๐ŸŒ“</button>
</header>

Tokens & contrast

Read live from theme.css: each text token against the --bg and --panel grounds of its theme, WCAG AA (4.5:1) marked โœ“.

tokendarklightrole
valueon bgon panelvalueon bgon panel

Icons

48 glyphs on the 24-px grid โ€” Material Design Icons (Pictogrammers, Apache-2.0) plus the bespoke marine set (drawn by CalCOFI/explore scripts/icon_glyphs.py): cat-* the twelve data categories, lens-* the Explorer's lenses, realm-*, ui-*. icons.css exports each as a mask (<i class="cc-i cc-i-cat-fish"></i> draws it in the text colour on any page); icons/calcofi-icons.svg is the same set as a sprite for same-origin <use>. The full contact sheet at 16 / 24 / 40 px โ†’

Files

filewhat
head.htmlthe <head> block to paste verbatim, before any stylesheet: favicon links, the inline pre-paint snippet, theme.css, theme.js
theme.cssthe tokens (--bg --panel --panel-2 --border --fg --muted --accent --accent-d --warn, both themes), .cc-header / .cc-footer, .cc-release, .cc-dark-only / .cc-light-only image pairing, the toggle icons as --cc-icon-sun / --cc-icon-moon
theme.jsresolve โ†’ apply โ†’ persist โ†’ toggle โ†’ notify (cc:theme); draws the toggle's icon over the ๐ŸŒ“ fallback
icons.css ยท icons/the icon set as CSS masks and as a sprite, with its contact sheet
logo_calcofi.svg ยท logo_calcofi_light.svgthe mark on a dark / light ground
favicon.ico ยท favicon-32x32.png ยท favicon-16x16.png ยท apple-touch-icon.pngthe favicon set
README.mdthe contract in full โ€” resolution order, the toggle, bridging a framework's own bar, the new-product checklist

Consumers in R: calcofi4r::cc_brand_head(), cc_brand_header(mode = cc_theme(request)), cc_is_dark(input), cc_tour_enabled(). Quarto: include libs/brand/quarto_head.html + quarto_header.html.