Skip to content

22/Documentation

Themes reference

Every key, colour token, shape word, ground pattern, terminal palette key, typeface, character and glyph set of a theme file, with its limits and defaults, complete and generated from the code

<!-- This page is generated by bun scripts/themes-reference.ts --write from web/src/lib/theme/catalogue.ts. Do not edit it by hand. -->

This page lists every key, colour token, word and limit of a ColliePWA theme file, and it is complete. It is generated from the code, so it cannot drift. It is the one list: Themes explains how to pick, write, check and share a theme.

The file

A theme is one JSON file with these keys, and no others. An unknown key anywhere is refused with its name.

KeyTypeNeededFrom versionWhat it is
$schematextno1Allowed and ignored, so an editor can offer help.
versionwhole numberyes1The version of the format. This Collie reads 1, 2, 3, 4, 5. Write the lowest version that holds the file.
idtextyes11 to 32 of a-z, 0-9 and -, starting with a letter or a digit. The id of a theme that Collie ships (collie, nightwatch, daylight, harbour) is refused.
nametextyes11 to 40 characters, with no control character.
authortextno1At most 60 characters, with no control character.
lightobject of tokensone of light and dark1The colours of the light half. A token it leaves out takes the value of the theme Collie.
darkobject of tokensone of light and dark1The colours of the dark half. A token it leaves out takes the value of the theme Collie.
fontsobjectno1ui (the face of the app, from version 1) and display (the face of titles, from version 2). Each is one of system, grotesk, aldrich, plex, geist, atkinson, nunito.
surfaceobject of wordsno2The shape words. Every key is optional, and a key left out takes its default word.
ansiobject of coloursno2The terminal palette. It holds all 18 keys or none.
characterwordno4The character in the header, one word of the characters table.
glyphswordno4The icon set every icon is drawn in, one word of the glyph sets table.
characterMotionwordno5Whether the header character drifts at rest: moves, still. Absent is moves. A person's own switch in Settings wins over it.

A complete file that uses every part of the newest version:

{
  "version": 5,
  "id": "my-day",
  "name": "My day",
  "author": "Sam",
  "light": {
    "background": "oklch(0.985 0 0)",
    "primary": "oklch(0.18 0 0)"
  },
  "dark": {
    "background": "oklch(0.12 0 0)",
    "status-blocked": "oklch(0.81 0.13 60)",
    "find": "oklch(0.769 0.188 70.08 / 0.4)"
  },
  "fonts": {
    "ui": "geist",
    "display": "atkinson"
  },
  "surface": {
    "radius": "round",
    "shadow": "lifted",
    "rows": "cards",
    "chrome": "page",
    "ground": {
      "pattern": "dots",
      "size": "fine",
      "strength": "faint"
    }
  },
  "ansi": {
    "0": "#3a332c",
    "1": "#ff5f56",
    "2": "#5fd068",
    "3": "#ffd84a",
    "4": "#5aa9ff",
    "5": "#e07ce8",
    "6": "#3fd6d0",
    "7": "#f2efe9",
    "8": "#8a827a",
    "9": "#ff8a80",
    "10": "#7ad683",
    "11": "#ffeb8a",
    "12": "#8cc4ff",
    "13": "#f0a6f5",
    "14": "#6ad8d2",
    "15": "#ffffff",
    "ink": "#f5f0e8",
    "ground": "#1a1612"
  },
  "character": "kawaii",
  "glyphs": "phosphor",
  "characterMotion": "still"
}

Versions

A file says which version it is. Write the lowest version that holds what the file has.

VersionWhat the file may hold
1Colours in light and dark, and fonts.ui.
2Everything in version 1, and any of surface, fonts.display and ansi.
3Everything in version 2, and the optional tokens pane-active, tab-active, find, surface-recess, surface-paper.
4Everything in version 3, the keys character and glyphs, and surface.ground as an object.
5Everything in version 4, and the key characterMotion.

A file at version 1:

{
  "version": 1,
  "id": "my-day",
  "name": "My day",
  "fonts": {
    "ui": "geist"
  },
  "light": {
    "background": "oklch(0.985 0 0)"
  }
}

A file at version 2:

{
  "version": 2,
  "id": "my-day",
  "name": "My day",
  "surface": {
    "radius": "round"
  },
  "light": {
    "background": "oklch(0.985 0 0)"
  }
}

A file at version 3:

{
  "version": 3,
  "id": "my-day",
  "name": "My day",
  "dark": {
    "find": "oklch(0.769 0.188 70.08 / 0.4)"
  }
}

A file at version 4:

{
  "version": 4,
  "id": "my-day",
  "name": "My day",
  "character": "kawaii",
  "light": {
    "background": "oklch(0.985 0 0)"
  }
}

A file at version 5:

{
  "version": 5,
  "id": "my-day",
  "name": "My day",
  "characterMotion": "still",
  "light": {
    "background": "oklch(0.985 0 0)"
  }
}

Limits of a file

LimitValue
The fileat most 64 KiB
A colour valueat most 64 characters, as #rrggbb, #rrggbbaa, oklch(L C H) or oklch(L C H / A). L is 0 to 1, C is 0 to 0.5, H is 0 to 360, A is 0 to 1 or a percentage. No named colour, no rgb(), no var()
A colour in ansias above, with no alpha
foreground on background, in each halfa ratio of at least 3, or the file is refused

Colour tokens

Each half, light and dark, takes any of these. A token that a half leaves out takes the value of the theme Collie, which the last two columns show. The tokens of the group Optional need version 3, and a half that sets none of them draws as it always did.

Surfaces and inks

TokenWhat it coloursCollie, lightCollie, dark
backgroundThe page.oklch(0.955 0.003 80)oklch(0.17 0.003 80)
foregroundText on the page.oklch(0.14 0 0)oklch(0.985 0 0)
cardA raised panel.oklch(1 0 0)oklch(0.235 0.003 80)
card-foregroundText on a card.oklch(0.14 0 0)oklch(0.985 0 0)
chromeThe header and the bars.oklch(0.915 0.004 80)oklch(0.28 0.003 80)
primaryThe main button.oklch(0.2 0 0)oklch(0.96 0 0)
primary-foregroundThe text on the main button.oklch(0.985 0 0)oklch(0.17 0.003 80)
control-onA switch or a segment that is on.oklch(0.88 0.06 235)oklch(0.34 0.06 240)
control-on-foregroundThe text on a switch or a segment that is on.oklch(0.32 0.12 245)oklch(0.92 0.06 235)
secondaryA quieter button. Also the fill of the band under chrome: band.oklch(0.915 0.004 80)oklch(0.28 0.003 80)
secondary-foregroundThe text on a quieter button.oklch(0.16 0 0)oklch(0.985 0 0)
mutedA quiet surface.oklch(0.915 0.004 80)oklch(0.28 0.003 80)
muted-foregroundThe grey text.oklch(0.40 0.004 80)oklch(0.80 0.004 80)
accentA hover or a selected row.oklch(0.885 0.004 80)oklch(0.32 0.003 80)
accent-foregroundThe text on a hover or a selected row.oklch(0.16 0 0)oklch(0.985 0 0)
destructiveThe delete button.oklch(0.5 0.21 27)oklch(0.72 0.19 22)
destructive-foregroundThe text on the delete button.oklch(0.985 0 0)oklch(0.17 0.003 80)
borderThe edge of a box.oklch(0.82 0.004 80)oklch(0.42 0.003 80)
inputThe edge of a field.oklch(0.64 0.004 80)oklch(0.58 0.003 80)
ruleA thin line between rows.oklch(0.72 0.004 80)oklch(0.52 0.003 80)
ringThe focus ring.oklch(0.5 0 0)oklch(0.76 0 0)

Status

TokenWhat it coloursCollie, lightCollie, dark
status-blockedAn agent waits on you.oklch(0.43 0.2 25)oklch(0.8 0.15 24)
status-workingAn agent is working.oklch(0.43 0.12 72)oklch(0.84 0.15 82)
status-doneAn agent is done.oklch(0.41 0.14 152)oklch(0.77 0.16 152)
status-idleAn agent is at rest.oklch(0.42 0.02 250)oklch(0.78 0.03 250)
status-unknownCollie cannot tell.oklch(0.38 0.02 250)oklch(0.75 0.03 250)
status-infoA note, not a state.oklch(0.42 0.14 230)oklch(0.82 0.15 230)

Syntax

TokenWhat it coloursCollie, lightCollie, dark
syntax-keywordKeywords in code and diffs.oklch(0.46 0.2 350)oklch(0.78 0.15 350)
syntax-stringStrings in code and diffs.oklch(0.43 0.13 250)oklch(0.82 0.1 240)
syntax-constantNumbers and constants in code and diffs.oklch(0.44 0.13 55)oklch(0.82 0.12 60)
syntax-propertyProperty names in code and diffs.oklch(0.43 0.09 200)oklch(0.82 0.09 195)
syntax-entityTypes and function names in code and diffs.oklch(0.45 0.18 300)oklch(0.79 0.13 300)
syntax-commentComments in code and diffs.oklch(0.46 0.004 80)oklch(0.74 0.004 80)

Host

TokenWhat it coloursCollie, lightCollie, dark
host-0One of the ten colours that tell your machines apart.oklch(0.45 0.085 221)oklch(0.789 0.154 221)
host-1One of the ten colours that tell your machines apart.oklch(0.45 0.143 41)oklch(0.75 0.183 41)
host-2One of the ten colours that tell your machines apart.oklch(0.45 0.2 302)oklch(0.74 0.2 302)
host-3One of the ten colours that tell your machines apart.oklch(0.45 0.129 132)oklch(0.841 0.238 132)
host-4One of the ten colours that tell your machines apart.oklch(0.45 0.192 352)oklch(0.718 0.202 352)
host-5One of the ten colours that tell your machines apart.oklch(0.45 0.082 185)oklch(0.777 0.152 185)
host-6One of the ten colours that tell your machines apart.oklch(0.45 0.2 262)oklch(0.707 0.165 262)
host-7One of the ten colours that tell your machines apart.oklch(0.45 0.2 325)oklch(0.74 0.238 325)
host-8One of the ten colours that tell your machines apart.oklch(0.45 0.108 241)oklch(0.746 0.16 241)
host-9One of the ten colours that tell your machines apart.oklch(0.45 0.2 280)oklch(0.7 0.18 280)

Optional

TokenWhat it coloursCollie, lightCollie, dark
pane-activeThe frame of the active pane column on a large screen, a 1px line. Your colour is the start, not the result: Collie mixes it into your background (70% your colour in light, 60% in dark), then moves its lightness until it has 3:1 against the recess, the page and the paper. A half that leaves it out starts from its own control-on-foreground.color-mix(in oklab, var(--control-on-foreground) 70%, var(--background))color-mix(in oklab, var(--control-on-foreground) 60%, var(--background))
tab-activeThe top edge of the open tab and the ring of the open pane, when the theme sets tabs to folder. A half that leaves it out takes its own text colour.oklch(0.14 0 0)oklch(0.985 0 0)
findThe ground under a found or matched piece of text: a hit of Find in Chat, and the marked letters of the session filter. Give it an alpha, because it lies over the surface under the text and the text keeps its own colour. A half that leaves it out takes the amber of the theme Collie.oklch(0.879 0.169 91.605 / 0.7)oklch(0.769 0.188 70.08 / 0.4)
surface-recessOn a large screen, the ground of the sidebar and the tab strip: one step below the page. A half that leaves it out takes the page, 0.05 darker.oklch(from var(--background) calc(l - 0.05) c h)oklch(from var(--background) calc(l - 0.05) c h)
surface-paperOn a large screen, the ground of the pane you are working in: the lightest surface on the screen. A half that leaves it out takes, in light, the card 0.05 lighter, and in dark, the point halfway between the page and the card 0.05 lighter.oklch(from var(--card) min(1, calc(l + 0.05)) c h)color-mix(in oklch, var(--background), oklch(from var(--card) calc(l + 0.05) c h))

Shape and look

The surface block holds one closed word for each key. A word is a name and never a number, and a key left out takes its default word.

radius

The corners of controls, at four steps. A circle stays a circle. A marked row wears a bar on its left edge under sharp, and a ring on all four sides under soft and round.

WordDefaultWhat it doesSets
sharpyesSquare corners at every step.--radius-sm: 2px, --radius-md: 2px, --radius-lg: 2px, --radius-xl: 2px
softSlightly rounded corners.--radius-sm: 4px, --radius-md: 6px, --radius-lg: 8px, --radius-xl: 12px
roundRound corners.--radius-sm: 8px, --radius-md: 12px, --radius-lg: 16px, --radius-xl: 24px

shadow

The shadows under raised things.

WordDefaultWhat it doesSets
flatyesNo shadow anywhere.
defaultSoft shadows of the usual sizes.
liftedEvery shadow one step deeper.

density

The space around controls. Tap targets never go below their default size, and the icons keep theirs.

WordDefaultWhat it doesSets
defaultyesSpacing as it is.--spacing: 0.25rem
roomyEvery space, gap, height and width a little larger.--spacing: 0.28rem

weight

How heavy medium and semibold text is.

WordDefaultWhat it doesSets
boldyesHeavier medium and semibold text.--font-weight-medium: 600, --font-weight-semibold: 700
defaultLighter medium and semibold text.--font-weight-medium: 500, --font-weight-semibold: 600

border

The width of the lines around things.

WordDefaultWhat it doesSets
defaultyesThin lines.--surface-border-width: 1px
strongThicker lines.--surface-border-width: 2px

ground

What is drawn behind the page. A word here, or the object form of version 4 (see Ground).

WordDefaultWhat it doesSets
flatyesThe page is one colour.
gradientThe page runs from background at the top toward background mixed with primary at the foot.
grainFine diagonal lines of background mixed with foreground. The theme Collie names it.

chrome

How the header, the tab bar and the bottom bar are drawn.

WordDefaultWhat it doesSets
bandyesFilled with secondary and edged with border.--band-ground: var(--secondary), --band-rule: var(--border)
pageThe page colour with a rule.

rows

How the rows of a list are drawn.

WordDefaultWhat it doesSets
rulesyesOne framed group with a line between rows.
cardsEvery row is its own card: a gap, an edge, a corner, a small shadow and the card colour.

icons

The width of the lines of an icon.

WordDefaultWhat it doesSets
defaultyesIcon lines of the usual width.--icon-stroke: 2
thinThinner icon lines.--icon-stroke: 1.5
heavyHeavier icon lines.--icon-stroke: 2.5

labels

How small section labels are written.

WordDefaultWhat it doesSets
sentenceyesAs they are typed.--label-transform: none, --label-tracking: normal
capsIn capitals with a little spacing.--label-transform: uppercase, --label-tracking: 0.025em

zoom

Whether the Zoom pill shows on the Belt.

WordDefaultWhat it doesSets
screenyesIt shows in the Screen view, never in Chat.
noneIt never shows.

tabs

How the open tab is drawn.

WordDefaultWhat it doesSets
plainyesThe open tab differs from the others by its text colour and weight only.
folderThe open tab is a folder tab, filled with the page colour, with a line on each side and a top edge in tab-active. It joins the row of panes under it, and the open pane is a tinted cell with a ring in tab-active.

composer

How the composer is drawn.

WordDefaultWhat it doesSets
fieldyesOne text field with its row of controls.
boxA box.

Ground

From version 4, surface.ground may be an object of four keys in place of a word. A key it leaves out takes its default word. A word that this Collie does not know is kept as written and drawn as the default.

KeyWordsWhat it does
patternflat gradient grain dots grid lines checks waves weaveWhat is drawn behind the page.
sizedefault fine wideThe spacing of the pattern: its default, three quarters of it, or twice it.
strengthdefault faint boldHow much ink is mixed into the page colour.
inkforeground primaryThe colour mixed in. gradient takes primary, every other pattern foreground.

Patterns

PatternWhat it draws
flatNothing. The page is one colour.
gradientThe page darkens or lightens toward the foot.
grainTwo sets of fine diagonal lines. The ground of the theme Collie.
dotsA small dot at a regular pitch.
gridLines across and down.
linesOne set of diagonal lines.
checksA checker of squares.
wavesRows of wavy lines.
weaveA woven pattern, like cloth.

Sizes

SizeFactor on every pitch
default1
fine0.75
wide2

Strengths

The percent of ink mixed into the page colour. The ink is foreground or primary.

StrengthA lineA dotA blockFoot of gradient
default4%7%3%12%
faint2.5%5%2%7%
bold7%10%5%18%

Terminal palette

The ansi block gives the terminal mirror its own colours. It holds all 18 keys or none, and each colour is #rrggbb or oklch() with no alpha.

The keys: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ink, ground. The numbers are the 16 slots. ink is the text, and ground is the background.

A colour that fails a gate is refused with its key named.

GateRule
Inkink on ground at 4.5 or better.
Dark spaceground is darker than ink.
SlotsSlots 1 to 15 on ground at 3 or better. Slot 0 is exempt, because black draws as no colour.
Bright setSlots 3, 7, 11, 15 have a relative luminance above 0.6.
The restThe other 12 slots have a relative luminance of 0.6 or less.

The contrast report

collie theme check and the preview of an import measure these pairs and warn below each floor. A warning does not refuse the file.

PairFloor
Text on a ground (foreground, muted-foreground, the status chips, status-blocked and destructive as text)4.5
destructive as an icon3
rule on background1.3
A status colour over its wash, as a chip4.5, with the colour over a wash of 15 percent
status-blocked apart from status-donea distance of 0.15

Typefaces

fonts.ui and fonts.display take one of these words. A theme cannot add a face.

WordFace
systemthe system font
groteskSpace Grotesk
aldrichAldrich
plexIBM Plex Sans
geistGeist
atkinsonAtkinson Hyperlegible Next
nunitoNunito

Characters

The header character, set with the key character at the top level. A theme without it shows Collie.

WordNameWhat it is
collieCollieThe collie head in profile, in the ink of the page. The default.
collie-collarCollie with collarThe collie head in profile with a white collar, drawn in the colour of the page.
collie-blazeCollie with blazeThe collie head in profile with a white blaze, drawn in a soft grey.
kawaiiKawaiiA round puppy face from the front, with big glossy eyes and candy pearls.
kawaii-tiltKawaii TiltThe same puppy with its head tilted.
pixelPixelAn 8-bit collie head with square beads that hop.
glassGlassA collie head in profile as a leaded stained-glass panel, with jewels in the ring.
glass-frontGlass FrontThe same stained glass, the head from the front.
sheepSheepThe sheep the collie herds: a charcoal face in cream wool, in profile.
owlOwlThe owl that watches through the night, from the front, with huge amber eyes.

Character motion

Whether the header character drifts at rest, set with the key characterMotion at the top level. A theme without it moves. A person's own switch in Settings wins over the theme on that device.

WordNameWhat it is
movesMovesThe character drifts slowly at rest, while the app is visible. The default.
stillStillThe character holds still at rest. It still turns while Collie works, and for an update.

Glyph sets

The icon set every icon is drawn in, set with the key glyphs at the top level. A theme without it shows Lucide.

WordNameWhat it is
lucideLucideRound lines of even width. The default.
phosphorPhosphorSoft and slightly rounder lines.
phosphor-fillPhosphor FillThe Phosphor icons as solid shapes.
phosphor-duotonePhosphor DuotoneThe Phosphor lines with a pale fill behind them.
iconoirIconoirLight, open lines.

Edit this page on GitHub

The rest of the documentation