Universal style guide for CTO bots

Chartroom

One set of colors, type, logos, layouts and principles for every HTML page a reporting bot builds, including admin pages such as the MyWaters trips screens. Every color, font and logo rule on this page is a default James can override. The machine-readable source is tokens.json.

How to use this guide

Precedence is global tokens, then an app’s Layer 3 accent, then a page-level exception that must be logged. Bots should read tokens.json first, then STYLE-GUIDE.md, and report any deviation. Do not use a text and background pair that is not listed and passing in the contrast table.

Section 1

Principles Default

  1. Calm. Pages stay quiet when nothing changed. Motion is a brief highlight, not a restyle of the whole view.
  2. Honest data. Real figures and example figures are never mixed in one total. Example data always carries a reserved color, a hatch, and the word Example.
  3. Accessible by default. Contrast is computed, not eyeballed. Every status pairs color with a label. Focus, 44px targets, landmarks and labels are required, not optional polish.
  4. One source of truth. Tokens live in tokens.json. CSS custom properties are generated from that file. Apps do not invent a parallel palette.
  5. Semantic tokens first. Build with background, ink, muted, border, accent and status tokens. Never hard-code a hex in a page unless it is already an approved token.
  6. 60-30-10. About 60 percent of a page is neutral surface, 30 percent is secondary surface and text, and 10 percent is accent or status. Accent is for the one action or state that matters.
  7. Three color layers. Layer 1 is shared neutrals. Layer 2 is shared status (success, warning, danger, info, and reserved example). Layer 3 is the only layer an app chooses: one brand accent, with a fill and a text-safe variant.

Section 2

Color Default

The shared ink is a deep sea-navy at hue about 209, sitting between the documented xitmatters navy (#0D1C2E, hue about 213) and MyWaters ink (#16323A, hue about 193). The house accent is a deep sea at hue about 201. The complementary warm (copper, hue about 30) is reserved for data-viz series 2, not for the house accent. Violet (hue about 272) is reserved for example data and is used for nothing else.

Light neutrals, status and accent

Background #F3F6F8 Layer 1 · default
Subtle well #E6ECF1 Layer 1 · default
Surface #FFFFFF Layer 1 · default
Ink #14202B Layer 1 · default
Muted text #4A5A68 Layer 1 · default
Border #6B7A88 Layer 1 · default
House accent #0B4F73 Layer 3 · default
Accent text #0A4463 Layer 3 · default
Success text #0B5C32 Layer 2 · default
Success fill #0A5A30 Layer 2 · default
Warning text #7A4500 Layer 2 · default
Warning fill #8A4B00 Layer 2 · default
Danger text #9B1C1C Layer 2 · default
Danger fill #A11B1B Layer 2 · default
Info text #0B4E8A Layer 2 · default
Info fill #0C4E86 Layer 2 · default
Example text #5B2A86 Layer 2 · reserved
Example fill #5C2A88 Layer 2 · reserved

Data-viz series (max five)

Each mark was checked at 3:1 on light background and surface and on dark background, surface and raised surface. Further series use muted gray. Do not use the example violet here.

Chart 1 · sea #0C81C0 Data-viz · default
Chart 2 · copper #B76615 Data-viz · default
Chart 3 · kelp #128C59 Data-viz · default
Chart 4 · steel #5C7AB7 Data-viz · default
Chart 5 · wine #C44858 Data-viz · default

Dark theme

Dark mode is a first-class token set, not an inversion. Solid fills were lifted so a control fill is at least 3:1 against dark surfaces and 4.5:1 with a white label. Status text has its own dark variants.

Dark background #0D131A Layer 1 · default
Dark surface #161E28 Layer 1 · default
Dark raised #1C2632 Layer 1 · default
Dark ink #E6EDF2 Layer 1 · default
Dark muted #9AA8B5 Layer 1 · default
Dark accent fill #1677AC Layer 3 · default
Dark accent text #8EC5E0 Layer 3 · default
Dark success text #5DCCA0 Layer 2 · default
Dark warning text #E2B36A Layer 2 · default
Dark danger text #F0A0A0 Layer 2 · default
Dark info text #8CB8E8 Layer 2 · default
Dark example text #C9A6E6 Layer 2 · reserved

Contrast, computed

Ratios use the WCAG 2.x relative-luminance formula from the hex values in tokens.json. AA needs 4.5:1 for normal text and 3:1 for large text, icons, chart marks and input borders. Bold 14px text counts as normal text. This page also recomputes each row in the browser; a mismatch would be flagged as a fail. 123 listed pairs were checked. All passed when the file was generated.

Text pairs (4.5:1)

Pair Mode Foreground Background Ratio Need Result
ink on bglight#14202B#F3F6F815.22:14.5:1 · textPass
ink on surfacelight#14202B#FFFFFF16.52:14.5:1 · textPass
ink on bgSubtlelight#14202B#E6ECF113.87:14.5:1 · textPass
ink on surfaceRaisedlight#14202B#F3F6F815.22:14.5:1 · textPass
muted on bglight#4A5A68#F3F6F86.55:14.5:1 · textPass
muted on surfacelight#4A5A68#FFFFFF7.11:14.5:1 · textPass
muted on bgSubtlelight#4A5A68#E6ECF15.97:14.5:1 · textPass
muted on surfaceRaisedlight#4A5A68#F3F6F86.55:14.5:1 · textPass
accentText on bglight#0A4463#F3F6F89.58:14.5:1 · textPass
accentText on surfacelight#0A4463#FFFFFF10.40:14.5:1 · textPass
accentText on bgSubtlelight#0A4463#E6ECF18.73:14.5:1 · textPass
onAccent on accentlight#FFFFFF#0B4F738.82:14.5:1 · textPass
successText on bglight#0B5C32#F3F6F87.47:14.5:1 · textPass
successText on surfacelight#0B5C32#FFFFFF8.10:14.5:1 · textPass
successText on successBglight#0B5C32#DCEFE46.76:14.5:1 · textPass
onAccent on successFilllight#FFFFFF#0A5A308.34:14.5:1 · textPass
warningText on bglight#7A4500#F3F6F87.22:14.5:1 · textPass
warningText on surfacelight#7A4500#FFFFFF7.84:14.5:1 · textPass
warningText on warningBglight#7A4500#F8EBD46.65:14.5:1 · textPass
onAccent on warningFilllight#FFFFFF#8A4B006.80:14.5:1 · textPass
dangerText on bglight#9B1C1C#F3F6F87.51:14.5:1 · textPass
dangerText on surfacelight#9B1C1C#FFFFFF8.15:14.5:1 · textPass
dangerText on dangerBglight#9B1C1C#F8DEDE6.40:14.5:1 · textPass
onAccent on dangerFilllight#FFFFFF#A11B1B7.81:14.5:1 · textPass
infoText on bglight#0B4E8A#F3F6F87.83:14.5:1 · textPass
infoText on surfacelight#0B4E8A#FFFFFF8.50:14.5:1 · textPass
infoText on infoBglight#0B4E8A#DCE8F56.84:14.5:1 · textPass
onAccent on infoFilllight#FFFFFF#0C4E868.57:14.5:1 · textPass
exampleText on bglight#5B2A86#F3F6F89.13:14.5:1 · textPass
exampleText on surfacelight#5B2A86#FFFFFF9.90:14.5:1 · textPass
exampleText on exampleBglight#5B2A86#EDE4F58.03:14.5:1 · textPass
onAccent on exampleFilllight#FFFFFF#5C2A889.81:14.5:1 · textPass
ink on bgdark#E6EDF2#0D131A15.78:14.5:1 · textPass
ink on surfacedark#E6EDF2#161E2814.20:14.5:1 · textPass
ink on bgSubtledark#E6EDF2#141C2514.53:14.5:1 · textPass
ink on surfaceRaiseddark#E6EDF2#1C263212.94:14.5:1 · textPass
muted on bgdark#9AA8B5#0D131A7.68:14.5:1 · textPass
muted on surfacedark#9AA8B5#161E286.91:14.5:1 · textPass
muted on bgSubtledark#9AA8B5#141C257.07:14.5:1 · textPass
muted on surfaceRaiseddark#9AA8B5#1C26326.30:14.5:1 · textPass
accentText on bgdark#8EC5E0#0D131A9.97:14.5:1 · textPass
accentText on surfacedark#8EC5E0#161E288.97:14.5:1 · textPass
accentText on bgSubtledark#8EC5E0#141C259.17:14.5:1 · textPass
accentText on surfaceRaiseddark#8EC5E0#1C26328.17:14.5:1 · textPass
onAccent on accentdark#FFFFFF#1677AC4.92:14.5:1 · textPass
successText on bgdark#5DCCA0#0D131A9.43:14.5:1 · textPass
successText on surfacedark#5DCCA0#161E288.49:14.5:1 · textPass
successText on successBgdark#5DCCA0#1433256.93:14.5:1 · textPass
onAccent on successFilldark#FFFFFF#0382404.92:14.5:1 · textPass
warningText on bgdark#E2B36A#0D131A9.68:14.5:1 · textPass
warningText on surfacedark#E2B36A#161E288.71:14.5:1 · textPass
warningText on warningBgdark#E2B36A#3225127.73:14.5:1 · textPass
onAccent on warningFilldark#FFFFFF#A3610F4.91:14.5:1 · textPass
dangerText on bgdark#F0A0A0#0D131A9.10:14.5:1 · textPass
dangerText on surfacedark#F0A0A0#161E288.19:14.5:1 · textPass
dangerText on dangerBgdark#F0A0A0#3A1A1A7.63:14.5:1 · textPass
onAccent on dangerFilldark#FFFFFF#D926264.93:14.5:1 · textPass
infoText on bgdark#8CB8E8#0D131A9.01:14.5:1 · textPass
infoText on surfacedark#8CB8E8#161E288.11:14.5:1 · textPass
infoText on infoBgdark#8CB8E8#162A3E7.06:14.5:1 · textPass
onAccent on infoFilldark#FFFFFF#0772CA4.92:14.5:1 · textPass
exampleText on bgdark#C9A6E6#0D131A8.96:14.5:1 · textPass
exampleText on surfacedark#C9A6E6#161E288.06:14.5:1 · textPass
exampleText on exampleBgdark#C9A6E6#2A1D387.57:14.5:1 · textPass
onAccent on exampleFilldark#FFFFFF#8D56BD5.00:14.5:1 · textPass

Graphics, charts and UI components (3:1)

Pair Mode Foreground Background Ratio Need Result
border on bg (input)light#6B7A88#F3F6F84.06:13:1 · graphics-or-uiPass
border on surface (input)light#6B7A88#FFFFFF4.41:13:1 · graphics-or-uiPass
focus on bglight#0B4F73#F3F6F88.13:13:1 · graphics-or-uiPass
focus on surfacelight#0B4F73#FFFFFF8.82:13:1 · graphics-or-uiPass
accent fill on bg (component)light#0B4F73#F3F6F88.13:13:1 · graphics-or-uiPass
accent fill on surface (component)light#0B4F73#FFFFFF8.82:13:1 · graphics-or-uiPass
successFill on bg (component)light#0A5A30#F3F6F87.68:13:1 · graphics-or-uiPass
warningFill on bg (component)light#8A4B00#F3F6F86.27:13:1 · graphics-or-uiPass
dangerFill on bg (component)light#A11B1B#F3F6F87.20:13:1 · graphics-or-uiPass
infoFill on bg (component)light#0C4E86#F3F6F87.90:13:1 · graphics-or-uiPass
exampleFill on bg (component)light#5C2A88#F3F6F89.03:13:1 · graphics-or-uiPass
ink mark on bg (logo)light#14202B#F3F6F815.22:13:1 · graphics-or-uiPass
ink mark on surface (logo)light#14202B#FFFFFF16.52:13:1 · graphics-or-uiPass
chart1 on bglight#0C81C0#F3F6F83.94:13:1 · chart-markPass
chart1 on surfacelight#0C81C0#FFFFFF4.27:13:1 · chart-markPass
chart2 on bglight#B76615#F3F6F83.93:13:1 · chart-markPass
chart2 on surfacelight#B76615#FFFFFF4.26:13:1 · chart-markPass
chart3 on bglight#128C59#F3F6F83.93:13:1 · chart-markPass
chart3 on surfacelight#128C59#FFFFFF4.27:13:1 · chart-markPass
chart4 on bglight#5C7AB7#F3F6F83.93:13:1 · chart-markPass
chart4 on surfacelight#5C7AB7#FFFFFF4.27:13:1 · chart-markPass
chart5 on bglight#C44858#F3F6F84.38:13:1 · chart-markPass
chart5 on surfacelight#C44858#FFFFFF4.76:13:1 · chart-markPass
border on bg (input)dark#8A98A6#0D131A6.33:13:1 · graphics-or-uiPass
border on surface (input)dark#8A98A6#161E285.70:13:1 · graphics-or-uiPass
border on surfaceRaised (input)dark#8A98A6#1C26325.19:13:1 · graphics-or-uiPass
focus on bgdark#6BA8C9#0D131A7.17:13:1 · graphics-or-uiPass
focus on surfacedark#6BA8C9#161E286.45:13:1 · graphics-or-uiPass
accent fill on bg (component)dark#1677AC#0D131A3.79:13:1 · graphics-or-uiPass
accent fill on surface (component)dark#1677AC#161E283.41:13:1 · graphics-or-uiPass
accent fill on surfaceRaised (component)dark#1677AC#1C26323.11:13:1 · graphics-or-uiPass
successFill on bg (component)dark#038240#0D131A3.80:13:1 · graphics-or-uiPass
successFill on surface (component)dark#038240#161E283.42:13:1 · graphics-or-uiPass
warningFill on bg (component)dark#A3610F#0D131A3.80:13:1 · graphics-or-uiPass
warningFill on surface (component)dark#A3610F#161E283.42:13:1 · graphics-or-uiPass
dangerFill on bg (component)dark#D92626#0D131A3.78:13:1 · graphics-or-uiPass
dangerFill on surface (component)dark#D92626#161E283.40:13:1 · graphics-or-uiPass
infoFill on bg (component)dark#0772CA#0D131A3.79:13:1 · graphics-or-uiPass
infoFill on surface (component)dark#0772CA#161E283.41:13:1 · graphics-or-uiPass
exampleFill on bg (component)dark#8D56BD#0D131A3.73:13:1 · graphics-or-uiPass
exampleFill on surface (component)dark#8D56BD#161E283.36:13:1 · graphics-or-uiPass
ink mark on bg (logo)dark#E6EDF2#0D131A15.78:13:1 · graphics-or-uiPass
ink mark on surface (logo)dark#E6EDF2#161E2814.20:13:1 · graphics-or-uiPass
chart1 on bgdark#0C81C0#0D131A4.37:13:1 · chart-markPass
chart1 on surfacedark#0C81C0#161E283.93:13:1 · chart-markPass
chart1 on surfaceRaiseddark#0C81C0#1C26323.58:13:1 · chart-markPass
chart2 on bgdark#B76615#0D131A4.38:13:1 · chart-markPass
chart2 on surfacedark#B76615#161E283.94:13:1 · chart-markPass
chart2 on surfaceRaiseddark#B76615#1C26323.59:13:1 · chart-markPass
chart3 on bgdark#128C59#0D131A4.37:13:1 · chart-markPass
chart3 on surfacedark#128C59#161E283.94:13:1 · chart-markPass
chart3 on surfaceRaiseddark#128C59#1C26323.59:13:1 · chart-markPass
chart4 on bgdark#5C7AB7#0D131A4.38:13:1 · chart-markPass
chart4 on surfacedark#5C7AB7#161E283.94:13:1 · chart-markPass
chart4 on surfaceRaiseddark#5C7AB7#1C26323.59:13:1 · chart-markPass
chart5 on bgdark#C44858#0D131A3.92:13:1 · chart-markPass
chart5 on surfacedark#C44858#161E283.53:13:1 · chart-markPass
chart5 on surfaceRaiseddark#C44858#1C26323.22:13:1 · chart-markPass

Decorative borderSubtle is not an approved text or input-border color. Disabled controls are exempt from these text ratios; they must still be distinguishable as disabled by more than color (reduced emphasis plus a disabled state).

Section 3

Typography Default

The default pairing is one complementary family: Source Serif Pro for display titles, Source Sans 3 for body and UI, and Source Code Pro for ids, tokens, logs and lining numbers. That is a classical contrast in structure with harmony in proportion. James may switch the body sans to Inter. Apps may keep Fraunces or Playfair Display for titles only. Operational pages (admin, dashboards, tables) use sans plus mono only — no display serif.

Fonts are self-hosted as Latin WOFF2 in /fonts. There is no Google Fonts runtime request. A system fallback stack is declared in CSS. At most two weights appear on a page (400 and 600). Tabular figures are on for tables, money and counters.

display · Source Serif Pro 600 · 40 / 48 · product and public titles only

The chart room holds the charts.

section · Source Serif Pro 600 · 30 / 38

A shared scale, used once.

heading · Source Sans 3 600 · 24 / 32

Operational headings stay sans.

title · Source Sans 3 600 · 20 / 28

Card titles and compact headers

body · Source Sans 3 400 · 16 / 26 · measure 40rem on reading pages

Body copy uses a humanist sans so tables, forms and trip itineraries stay even in stroke. Line length on reading pages is capped; admin pages may use the wider 80rem measure.

caption · Source Sans 3 400 · 14 / 20

Captions, dense table cells, and supporting meta.

label · Source Sans 3 600 · 12 / 16 · 0.08em · uppercase

Section labels and field names

mono · Source Code Pro 400 · tabular

trip_id 0042   $1,240.00   2026-12-04

Section 5

Layout and spacing Default

Spacing is a 4px modular scale: 4, 8, 12, 16, 24, 32, 48, 64, 96. Page padding is 24px. Content measures are 40rem for reading, 80rem for admin, and 90rem for dashboards. Breakpoints: 640, 768, 1024, 1280. Radii are modest — 4, 8 and 12px — not pill-shaped, so admin pages stay consistent. Apps may override radii.

Tables default to a 44px comfortable row (and 36px dense), 12px cell padding, right-aligned tabular numbers, and a sticky header when the list scrolls. Calculated rows may use the subtle well color; user-editable rows use the card surface.

Section 6

Components Default

Buttons

Primary uses the accent fill with on-accent labels. Secondary uses a 3:1 border. Ghost is ink on a transparent fill. Danger uses the danger fill. Disabled is allowed to drop below text contrast but must also look disabled (reduced emphasis, not color alone). All interactive targets are at least 44px tall.

Cards

Surface card

Cards sit on the page background, use the surface token, a subtle border, and the large radius. Titles are sans at the title step.

One action

Keep accent to the action that matters. Supporting copy uses muted text only when it still meets 4.5:1, which this muted token does.

Status badges

Every status is a color plus a word. Do not ship a color-only chip.

Success Warning Danger Info Neutral Example

Tables and example data

The last row is illustrative only. It uses the reserved violet, a 45-degree hatch, and the word Example. Never add an example cell into a real total.

Trip Harbor Nights Amount Status
Spring run Beaufort 4 $1,240.00 Confirmed
Harbor check Oriental 1 $180.00 Pending
Sample itinerary Example Sample harbor 3 $890.00 Example

Section 7

Motion and calm refresh Default

Durations are 120ms, 200ms and 400ms, with a 1200ms highlight fade, all on a deceleration curve cubic-bezier(0.2, 0, 0, 1). A calm refresh patches only the value that changed and applies one soft highlight that fades. It does not rebuild or flash the whole view. When prefers-reduced-motion: reduce is set, durations collapse to 0.01ms and the highlight may remain as a static mark instead of a fade.

Usage 12.0%

Section 8

Accessibility Default

  • Contrast: use only listed, passing pairs. Re-check any override in both themes before merging it.
  • Focus: a 2px solid focus ring in the focus token, offset 2px. Never remove the outline without this replacement. Tab to the buttons above to see it.
  • Targets: 44px minimum on buttons, switches, and other controls.
  • Keyboard: all actions are reachable and visible; this page has a skip link, a labelled nav, one main, and a footer.
  • Labels: form fields need a visible label. Status is never color alone.
  • Print: the theme toggle and in-page nav hide; ink on white is used.

Section 9

Per-app accents Default

Apps override Layer 3 only: one accent fill and its text-safe variant, and optionally a display serif for product titles. Shared neutrals, status colors, body sans and mono stay global. Colors quoted below are from the proposal Page or the documented MyWaters files. Accents for unreviewed apps are not invented; those apps use the house accent until one is chosen.

App Layer 3 accent Display face Notes
Chartroom #0B4F73 fill, #0A4463 text Source Serif Pro (default) House accent. Default.
MyWaters Documented brand teal #0F5C5A (passes as text and as a white-label fill). Documented burnt orange #C45C26 fails AA with white (4.28:1); documented accent text #A34D20 fails on bg-2 (4.33:1). Fraunces (documented) Recommended defaults if orange is kept: fill #A84816 (white 5.83:1), text #8F441C (5.23:1 on bg-2). These are recommendations only; the documented hex values are not changed here. Body is already Source Sans 3. No dark mode was documented.
Projects Not yet chosen — house accent as default Sans only unless a display face is chosen Repo not reviewed for this scaffold.
Tides Not yet chosen — house accent as default Sans only unless a display face is chosen Repo not reviewed for this scaffold.
Water Level Sensor · Dock Not yet chosen — house accent as default Sans only unless a display face is chosen Repo not reviewed for this scaffold.
BuiltInController Not yet chosen — house accent as default Sans only unless a display face is chosen Repo not reviewed for this scaffold.
Home Security Not yet chosen — house accent as default Sans only unless a display face is chosen Repo not reviewed for this scaffold.
Oversight Not yet chosen — house accent as default Sans plus mono on operational pages The proposal Page records four unrelated mockup palettes (v4, v5a, v5b, v5c). No single accent is treated as decided.

The earlier xitmatters guide was used as prior art. Its documented navy and silver, and the contrast failures in its tokens (positive green, some destructive and chart pairs), informed this palette. xitmatters is not treated as a bot in the adoption table above.