Theme inspector
Internal tool. Not in the sidebar, not linked from anywhere.
Every colour on this site resolves from src/styles/brand.css. The swatches below read their
values from the live page, so they cannot drift from the stylesheet. Every control writes to
:root, so the sidebar, the table of contents, this prose and the code block further down all
repaint together — you are changing the real page, not a mock of it.
Nothing here is saved. Reload to discard.
Flash sets one token to cyan for a moment. That is the fastest way to learn what a token owns: press it and watch which parts of the page move.
Surfaces
--bgPage ground. Starlight --sl-color-bg and --sl-color-bg-sidebar.--bg-1Starlight --sl-color-gray-7. Image backing in prose.--bg-2Inline-code ground, Starlight --sl-color-gray-6.
Text
--fgHeadings, page title, bold, active nav row. Starlight --sl-color-white.--fg-1Starlight --sl-color-text. Table cells, aside body, inline code.--fg-dimThe whole left sidebar, eyebrows, section labels.--fg-dimmerStarlight --sl-color-gray-4 only.--fg-fadeSidebar group labels, right-rail TOC, footer note.
Lines
--borderStarlight hairlines, image frames, landing grid rules.--border-1Secondary button outline, --sl-color-hairline-shade.--border-strongSecondary button hover, code-block scrollbar thumb.
Accent
--accentProse links, active sidebar rail and wash, TOC current, focus, caution asides. Text only — never a fill.--accent-fillCTA fill, ::selection, sidebar current-page background. The same hue as --accent, dark enough to carry white text.--accent-deepPressed and hover states on an --accent-fill surface.--cta-fgText and icon colour on top of an --accent-fill surface.--accent-ringThe 4px halo on primary-button hover. Computed from --accent-fill.--glow-aStrength of the ambient wash on body. Its hue comes from --accent.
Diagram ink
--inkD2 diagram text under the light theme.--ink-dimMuted D2 diagram text under the light theme.
Will not respond
One place sets a colour literally instead of reading a token. Nothing above moves it.
astro.config.mjs:37-50Nine hardcoded hexes in the mermaid themeVariables block.Baked into the SVG at build time, so no runtime change can reach them.
What Starlight gives you by default
Section titled “What Starlight gives you by default”Measured on a clean bun create astro --template starlight project, Starlight 0.41, read out of
the browser rather than the docs.
| Default dark | Default light | |
|---|---|---|
| Accent | #3369ff |
#3d50f5 |
| Page ground | #17181c |
#ffffff |
| Sidebar ground | #23262f |
#ffffff |
| Body text | #c1c3c8 |
#353841 |
| Highest-contrast text | #ffffff |
#17181c |
| Hairline | #23262f |
#edeef3 |
Three things follow from that, and all three shape what a light palette here has to do.
The default accent is blue, not purple. Purple ships as --sl-color-purple-* and is spent on tip
asides alone. The purple you see on this site is ours.
Starlight is dark-first. Bare :root carries the dark palette; :root[data-theme='light']
overrides it. A theme that writes one set of values into all three scopes — which is what
starlight-theme.css does today — has no light mode, only a toggle that changes nothing.
--sl-color-white is a role, not a colour. It means highest contrast against the current
ground: white in dark mode, #17181c in light. Pinning it to bone is why the toggle had to be
locked off.
Why the light preview shifts the accent
Section titled “Why the light preview shifts the accent”The accent is #ffc857. On the dark ground it is excellent — better than the coral it replaced.
On any light ground it is unusable.
| Pair | Ratio | AA body text |
|---|---|---|
#ffc857 on #0a0a0a |
12.87 | passes |
#000000 on #ffc857 fill |
13.65 | passes |
#ffffff on #ffc857 fill |
1.54 | fails |
#ffc857 on #f5f3f0 |
1.39 | fails |
#7a4f00 on #f5f3f0 |
6.44 | passes |
Two rules follow. --cta-fg must stay dark, because white on this accent is 1.54. And a light
palette has to darken the accent hard — to roughly #7a4f00 — because yellow carries almost no
contrast against bone. The preview above does exactly that.