Foundations
Colors
Two tokens carry almost everything: a ground and an ink. OKLCH throughout, so a dark-mode flip is a lightness change rather than a re-pick. Every surface resolves from a variable, so light and dark are one definition rather than two stylesheets, and every value below is read from globals.css, light then dark. Toggle the theme and the swatches repaint.
Ground and ink
The page, the card, the two inks and the hairline. Every surface and every line of text resolves from these.
| Token | Sample | Light | Dark |
|---|---|---|---|
| --background | oklch(0.955 0.002 106) | oklch(0.09 0 0) | |
| --foreground | oklch(0.122 0.001 0) | oklch(0.985 0 0) | |
| --card | oklch(1 0 0) | oklch(0.138 0 0) | |
| --card-foreground | oklch(0.145 0 0) | oklch(0.985 0 0) | |
| --primary | oklch(0.122 0.001 0) | oklch(0.707 0.108 152.216) | |
| --primary-foreground | oklch(0.985 0 0) | oklch(0.25 0.001 0) | |
| --muted | oklch(0.925 0.004 106) | oklch(0.269 0 0) | |
| --muted-foreground | oklch(0.36 0.001 0) | oklch(0.708 0 0) | |
| --border | oklch(0.88 0.003 106) | oklch(1 0 0 / 10%) | |
| --input | oklch(0.925 0 0) | oklch(1 0 0 / 15%) | |
| --ring | oklch(0.708 0 0) | oklch(0.556 0 0) | |
| --hairline | oklch(0.19 0.01 95 / 8%) | oklch(1 0 0 / 6%) | |
| --border-strong | oklch(0.19 0.01 95 / 20%) | oklch(1 0 0 / 18%) |
--backgroundThe light ground is a light grey rather than white, and that is what makes the card material work in this theme at all.
At 0.97 there were three points of luminance between the page and pure white for a whole material to live in, so a card's fill landed eight thousandths off the page at its bottom edge and the grade inside it had nowhere to go. Dark has ninety points to spend and looked like a material; light had three and looked like an outline.
Dropping it to 0.955 is still unmistakably an off-white page and roughly quadruples the range. It is the same reason a grouped table view on iOS sits on grey: the white is the card, so the page cannot also be white.
--hairlineFrom aka-design-system.
The opacity ladder, and its floor
Ink steps down, and that is the whole hierarchy: full ink, then the reading step, then the quiet layer.
The ladder
each row set in its own step
text-foregroundFull ink: the terms a reader will look for againtext-foreground/85The reading stepaka-ink-bodyAn essay’s body, named onceaka-ink-quietAn essay’s quiet layertext-foreground/60The foreground’s floortext-muted-foregroundMuted inktext-muted-foreground/75The muted floor, and ink on art
Each step is a modifier on the token, text-foreground/85, and the config renders it as a color-mix against the page. The mix is sRGB rather than OKLCH because the tokens are achromatic with an explicit hue of 0, and an OKLCH mix would interpolate it.
The ladder has a floor, and the floor is law 09: no text is mixed below the point where it reads at 4.5:1 on the page in both themes. For the foreground that is text-foreground/60. For the muted ink, which starts closer to the ground, it is text-muted-foreground/75, and ink on art holds the same 75. The check computes both from the tokens in globals.css, so a token that moves takes its floor with it, and the sweep reads every page back through axe in both themes to prove what rendered.
Two steps are classes as well, because an essay names its ink once rather than carrying a number through every paragraph:
@layer components {
/*
* Reading ink.
*
* The theme colours are bare `var()` values with no `<alpha-value>` slot, so
* Tailwind cannot compute an alpha for them and a class like
* `text-foreground/75` emits no rule at all. Everything written that way is
* simply full ink today.
*
* A long essay needs the step between full ink and muted that those classes
* were reaching for: full white at 15px over forty paragraphs is glare, and
* muted is too faint to read at length. These two steps are mixed by hand.
*
* In srgb, like every other mix on this page: the tokens are achromatic but
* carry an explicit hue of 0, and an oklch mix interpolates that channel.
*/
.aka-ink-body {
color: color-mix(in srgb, var(--foreground) 82%, transparent);
}
.aka-ink-quiet {
color: color-mix(in srgb, var(--foreground) 62%, transparent);
}
}The slot is recent. For a long time the theme colours were bare var() values with nowhere to put an alpha, every modifier compiled to nothing, and the whole quiet layer rendered as full ink. The config now answers a modifier with the mix above. The light muted ink was darkened a step so the ladder reads the same on both grounds, and the floor followed once the quiet layer was measured rather than eyeballed: at 70 it read at 4.2:1.
One accent, and it is not --primary
| Token | Sample | Light | Dark |
|---|---|---|---|
| --select | oklch(0.58 0.13 250) | oklch(0.707 0.108 152.216) |
--selectThe one accent: what a selected tab, selected text and a focus ring take.
--select is what a selected tab, selected text and a focus ring take, and it is the only place a hue is allowed to lead. It changes hue across themes rather than lightness, because the blue that reads as “chosen” on paper goes muddy on the dark ground. --primary is near-black ink in light and the green in dark; it is a shadcn token the primitives inherited, not the system's accent. Select this sentence, or tab to a link, to see it.
Link and art inks
The green prose link and its hover, and the ink and wash for copy set on artwork, which hold in both themes.
| Token | Sample | Light | Dark |
|---|---|---|---|
| --ink-link | oklch(0.4 0.08 152.2) | oklch(0.707 0.108 152.216) | |
| --ink-link-hover | oklch(0.32 0.085 152) | oklch(0.78 0.1 152) | |
| --ink-on-art | oklch(1 0 0) | oklch(1 0 0) | |
| --wash-on-art | oklch(0 0 0) | oklch(0 0 0) |
--ink-linkThe green prose link two write-ups draw: a darker step of the same hue on hover. The values are what those pages carried inline, now themed.
--ink-on-artInk and wash for copy that sits on artwork rather than on the page: the Ubik cards' paintings are the same in both themes, so the ink over them is too. Theme-invariant on purpose, and a token so that is a decision rather than a literal.
Status
The one place a hue other than the accent may appear.
| Token | Sample | Light | Dark |
|---|---|---|---|
| --status-warn | oklch(0.58 0.13 75) | oklch(0.72 0.13 75) | |
| --status-danger | oklch(0.55 0.2 25) | oklch(0.62 0.2 25) |
--status-warnStatus, the one place a hue other than the accent may appear. Light takes a darker step of each hue so a 12px label still clears its ground.
Accent ramp
Five hues at a lightness that holds in each theme. The glass reads them, which is what makes them system rather than art.
| Token | Sample | Light | Dark |
|---|---|---|---|
| --accent-blue | oklch(0.55 0.19 259) | oklch(0.68 0.15 259) | |
| --accent-green | oklch(0.5 0.09 152) | oklch(0.71 0.11 152) | |
| --accent-amber | oklch(0.62 0.13 75) | oklch(0.83 0.12 80) | |
| --accent-rose | oklch(0.58 0.16 15) | oklch(0.7 0.15 15) | |
| --accent-violet | oklch(0.52 0.15 295) | oklch(0.75 0.11 295) |
--accent-blueCar palette for the pixel roundabout (shared with the circleheads brand engine)
Carried by the canvas engines. The five hues are what the pixel engines roll through, and law 02 keeps them out of the interface: the one place they reach the chrome is where hue is the value rather than decoration on one, as in the glass and the deck's position pill.
Palettes that belong to one drawing
When artwork has a value per theme, the palette goes in custom properties and the browser picks. Reading the theme in JavaScript would make a static drawing a client component, which is the whole cost being avoided. Two live examples: --bp-*, which carries Blockpad's dark and light icon masters, and --pixel-face-*, which re-homes the five face accents the circleheads handoff supplies as literal hex (they are on the Marks page).
The rule that keeps this honest: the source value stays written down where the design put it, and the token is where it is read from. So dark restates the handoff's hex exactly and only light diverges.
Inherited
Every token in the stylesheet is on one of these pages, including the ones the system does not draw with.
Inherited from shadcn: 23 tokensShowHide
Tokens the starter shipped that the chrome does not draw with. Shown so every token is accounted for, not as house vocabulary.
| Token | Sample | Light | Dark |
|---|---|---|---|
| --popover | oklch(1 0 0) | oklch(0.2 0 0) | |
| --popover-foreground | oklch(0.15 0.001 0) | oklch(0.985 0 0) | |
| --secondary | oklch(0.945 0.004 106) | oklch(0.269 0 0) | |
| --secondary-foreground | oklch(0.205 0 0) | oklch(0.985 0 0) | |
| --accent | oklch(0.733 0.059 144.941) | oklch(0.371 0 0) | |
| --accent-foreground | oklch(0.122 0.001 0) | oklch(0.985 0 0) | |
| --destructive | oklch(0.577 0.245 27.325) | oklch(0.611 0.25 28.967) | |
| --destructive-foreground | oklch(0.985 0 0) | oklch(0.985 0 0) | |
| --chart-1 | oklch(0.646 0.222 41.116) | oklch(0.621 0.136 268.368) | |
| --chart-2 | oklch(0.6 0.118 184.704) | oklch(0.706 0.127 166.713) | |
| --chart-3 | oklch(0.398 0.07 227.392) | oklch(0.79 0.143 75.382) | |
| --chart-4 | oklch(0.828 0.189 84.429) | oklch(0.576 0.275 302.917) | |
| --chart-5 | oklch(0.769 0.188 70.08) | oklch(0.395 0.158 18.745) | |
| --sidebar | oklch(0.757 0.001 0) | oklch(0.09 0 0) | |
| --sidebar-foreground | oklch(0.145 0 0) | oklch(0.985 0 0) | |
| --sidebar-primary | oklch(0.751 0.119 157.152) | oklch(0.625 0.118 158.973) | |
| --sidebar-primary-foreground | oklch(0.248 0.001 0) | oklch(0.985 0 0) | |
| --sidebar-accent | oklch(0.805 0.001 0) | oklch(0.502 0.039 164.709) | |
| --sidebar-accent-foreground | oklch(0.205 0 0) | oklch(0.985 0 0) | |
| --sidebar-border | oklch(0.922 0 0) | oklch(1 0 0 / 10%) | |
| --sidebar-ring | oklch(0.708 0 0) | oklch(0.439 0 0) | |
| --twt-red | oklch(0.577 0.245 27.325) | oklch(0.611 0.25 28.967) | |
| --twt-red-foreground | oklch(0.985 0 0) | oklch(0.985 0 0) |