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.
| Key | Type | Needed | From version | What it is |
|---|---|---|---|---|
$schema | text | no | 1 | Allowed and ignored, so an editor can offer help. |
version | whole number | yes | 1 | The version of the format. This Collie reads 1, 2, 3, 4, 5. Write the lowest version that holds the file. |
id | text | yes | 1 | 1 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. |
name | text | yes | 1 | 1 to 40 characters, with no control character. |
author | text | no | 1 | At most 60 characters, with no control character. |
light | object of tokens | one of light and dark | 1 | The colours of the light half. A token it leaves out takes the value of the theme Collie. |
dark | object of tokens | one of light and dark | 1 | The colours of the dark half. A token it leaves out takes the value of the theme Collie. |
fonts | object | no | 1 | ui (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. |
surface | object of words | no | 2 | The shape words. Every key is optional, and a key left out takes its default word. |
ansi | object of colours | no | 2 | The terminal palette. It holds all 18 keys or none. |
character | word | no | 4 | The character in the header, one word of the characters table. |
glyphs | word | no | 4 | The icon set every icon is drawn in, one word of the glyph sets table. |
characterMotion | word | no | 5 | Whether 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.
| Version | What the file may hold |
|---|---|
| 1 | Colours in light and dark, and fonts.ui. |
| 2 | Everything in version 1, and any of surface, fonts.display and ansi. |
| 3 | Everything in version 2, and the optional tokens pane-active, tab-active, find, surface-recess, surface-paper. |
| 4 | Everything in version 3, the keys character and glyphs, and surface.ground as an object. |
| 5 | Everything 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
| Limit | Value |
|---|---|
| The file | at most 64 KiB |
| A colour value | at 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 ansi | as above, with no alpha |
foreground on background, in each half | a 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
| Token | What it colours | Collie, light | Collie, dark |
|---|---|---|---|
background | The page. | oklch(0.955 0.003 80) | oklch(0.17 0.003 80) |
foreground | Text on the page. | oklch(0.14 0 0) | oklch(0.985 0 0) |
card | A raised panel. | oklch(1 0 0) | oklch(0.235 0.003 80) |
card-foreground | Text on a card. | oklch(0.14 0 0) | oklch(0.985 0 0) |
chrome | The header and the bars. | oklch(0.915 0.004 80) | oklch(0.28 0.003 80) |
primary | The main button. | oklch(0.2 0 0) | oklch(0.96 0 0) |
primary-foreground | The text on the main button. | oklch(0.985 0 0) | oklch(0.17 0.003 80) |
control-on | A switch or a segment that is on. | oklch(0.88 0.06 235) | oklch(0.34 0.06 240) |
control-on-foreground | The text on a switch or a segment that is on. | oklch(0.32 0.12 245) | oklch(0.92 0.06 235) |
secondary | A quieter button. Also the fill of the band under chrome: band. | oklch(0.915 0.004 80) | oklch(0.28 0.003 80) |
secondary-foreground | The text on a quieter button. | oklch(0.16 0 0) | oklch(0.985 0 0) |
muted | A quiet surface. | oklch(0.915 0.004 80) | oklch(0.28 0.003 80) |
muted-foreground | The grey text. | oklch(0.40 0.004 80) | oklch(0.80 0.004 80) |
accent | A hover or a selected row. | oklch(0.885 0.004 80) | oklch(0.32 0.003 80) |
accent-foreground | The text on a hover or a selected row. | oklch(0.16 0 0) | oklch(0.985 0 0) |
destructive | The delete button. | oklch(0.5 0.21 27) | oklch(0.72 0.19 22) |
destructive-foreground | The text on the delete button. | oklch(0.985 0 0) | oklch(0.17 0.003 80) |
border | The edge of a box. | oklch(0.82 0.004 80) | oklch(0.42 0.003 80) |
input | The edge of a field. | oklch(0.64 0.004 80) | oklch(0.58 0.003 80) |
rule | A thin line between rows. | oklch(0.72 0.004 80) | oklch(0.52 0.003 80) |
ring | The focus ring. | oklch(0.5 0 0) | oklch(0.76 0 0) |
Status
| Token | What it colours | Collie, light | Collie, dark |
|---|---|---|---|
status-blocked | An agent waits on you. | oklch(0.43 0.2 25) | oklch(0.8 0.15 24) |
status-working | An agent is working. | oklch(0.43 0.12 72) | oklch(0.84 0.15 82) |
status-done | An agent is done. | oklch(0.41 0.14 152) | oklch(0.77 0.16 152) |
status-idle | An agent is at rest. | oklch(0.42 0.02 250) | oklch(0.78 0.03 250) |
status-unknown | Collie cannot tell. | oklch(0.38 0.02 250) | oklch(0.75 0.03 250) |
status-info | A note, not a state. | oklch(0.42 0.14 230) | oklch(0.82 0.15 230) |
Syntax
| Token | What it colours | Collie, light | Collie, dark |
|---|---|---|---|
syntax-keyword | Keywords in code and diffs. | oklch(0.46 0.2 350) | oklch(0.78 0.15 350) |
syntax-string | Strings in code and diffs. | oklch(0.43 0.13 250) | oklch(0.82 0.1 240) |
syntax-constant | Numbers and constants in code and diffs. | oklch(0.44 0.13 55) | oklch(0.82 0.12 60) |
syntax-property | Property names in code and diffs. | oklch(0.43 0.09 200) | oklch(0.82 0.09 195) |
syntax-entity | Types and function names in code and diffs. | oklch(0.45 0.18 300) | oklch(0.79 0.13 300) |
syntax-comment | Comments in code and diffs. | oklch(0.46 0.004 80) | oklch(0.74 0.004 80) |
Host
| Token | What it colours | Collie, light | Collie, dark |
|---|---|---|---|
host-0 | One of the ten colours that tell your machines apart. | oklch(0.45 0.085 221) | oklch(0.789 0.154 221) |
host-1 | One of the ten colours that tell your machines apart. | oklch(0.45 0.143 41) | oklch(0.75 0.183 41) |
host-2 | One of the ten colours that tell your machines apart. | oklch(0.45 0.2 302) | oklch(0.74 0.2 302) |
host-3 | One of the ten colours that tell your machines apart. | oklch(0.45 0.129 132) | oklch(0.841 0.238 132) |
host-4 | One of the ten colours that tell your machines apart. | oklch(0.45 0.192 352) | oklch(0.718 0.202 352) |
host-5 | One of the ten colours that tell your machines apart. | oklch(0.45 0.082 185) | oklch(0.777 0.152 185) |
host-6 | One of the ten colours that tell your machines apart. | oklch(0.45 0.2 262) | oklch(0.707 0.165 262) |
host-7 | One of the ten colours that tell your machines apart. | oklch(0.45 0.2 325) | oklch(0.74 0.238 325) |
host-8 | One of the ten colours that tell your machines apart. | oklch(0.45 0.108 241) | oklch(0.746 0.16 241) |
host-9 | One of the ten colours that tell your machines apart. | oklch(0.45 0.2 280) | oklch(0.7 0.18 280) |
Optional
| Token | What it colours | Collie, light | Collie, dark |
|---|---|---|---|
pane-active | The 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-active | The 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) |
find | The 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-recess | On 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-paper | On 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.
| Word | Default | What it does | Sets |
|---|---|---|---|
sharp | yes | Square corners at every step. | --radius-sm: 2px, --radius-md: 2px, --radius-lg: 2px, --radius-xl: 2px |
soft | Slightly rounded corners. | --radius-sm: 4px, --radius-md: 6px, --radius-lg: 8px, --radius-xl: 12px | |
round | Round corners. | --radius-sm: 8px, --radius-md: 12px, --radius-lg: 16px, --radius-xl: 24px |
shadow
The shadows under raised things.
| Word | Default | What it does | Sets |
|---|---|---|---|
flat | yes | No shadow anywhere. | |
default | Soft shadows of the usual sizes. | ||
lifted | Every shadow one step deeper. |
density
The space around controls. Tap targets never go below their default size, and the icons keep theirs.
| Word | Default | What it does | Sets |
|---|---|---|---|
default | yes | Spacing as it is. | --spacing: 0.25rem |
roomy | Every space, gap, height and width a little larger. | --spacing: 0.28rem |
weight
How heavy medium and semibold text is.
| Word | Default | What it does | Sets |
|---|---|---|---|
bold | yes | Heavier medium and semibold text. | --font-weight-medium: 600, --font-weight-semibold: 700 |
default | Lighter medium and semibold text. | --font-weight-medium: 500, --font-weight-semibold: 600 |
border
The width of the lines around things.
| Word | Default | What it does | Sets |
|---|---|---|---|
default | yes | Thin lines. | --surface-border-width: 1px |
strong | Thicker lines. | --surface-border-width: 2px |
ground
What is drawn behind the page. A word here, or the object form of version 4 (see Ground).
| Word | Default | What it does | Sets |
|---|---|---|---|
flat | yes | The page is one colour. | |
gradient | The page runs from background at the top toward background mixed with primary at the foot. | ||
grain | Fine 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.
| Word | Default | What it does | Sets |
|---|---|---|---|
band | yes | Filled with secondary and edged with border. | --band-ground: var(--secondary), --band-rule: var(--border) |
page | The page colour with a rule. |
rows
How the rows of a list are drawn.
| Word | Default | What it does | Sets |
|---|---|---|---|
rules | yes | One framed group with a line between rows. | |
cards | Every 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.
| Word | Default | What it does | Sets |
|---|---|---|---|
default | yes | Icon lines of the usual width. | --icon-stroke: 2 |
thin | Thinner icon lines. | --icon-stroke: 1.5 | |
heavy | Heavier icon lines. | --icon-stroke: 2.5 |
labels
How small section labels are written.
| Word | Default | What it does | Sets |
|---|---|---|---|
sentence | yes | As they are typed. | --label-transform: none, --label-tracking: normal |
caps | In capitals with a little spacing. | --label-transform: uppercase, --label-tracking: 0.025em |
zoom
Whether the Zoom pill shows on the Belt.
| Word | Default | What it does | Sets |
|---|---|---|---|
screen | yes | It shows in the Screen view, never in Chat. | |
none | It never shows. |
tabs
How the open tab is drawn.
| Word | Default | What it does | Sets |
|---|---|---|---|
plain | yes | The open tab differs from the others by its text colour and weight only. | |
folder | The 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.
| Word | Default | What it does | Sets |
|---|---|---|---|
field | yes | One text field with its row of controls. | |
box | A 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.
| Key | Words | What it does |
|---|---|---|
pattern | flat gradient grain dots grid lines checks waves weave | What is drawn behind the page. |
size | default fine wide | The spacing of the pattern: its default, three quarters of it, or twice it. |
strength | default faint bold | How much ink is mixed into the page colour. |
ink | foreground primary | The colour mixed in. gradient takes primary, every other pattern foreground. |
Patterns
| Pattern | What it draws |
|---|---|
flat | Nothing. The page is one colour. |
gradient | The page darkens or lightens toward the foot. |
grain | Two sets of fine diagonal lines. The ground of the theme Collie. |
dots | A small dot at a regular pitch. |
grid | Lines across and down. |
lines | One set of diagonal lines. |
checks | A checker of squares. |
waves | Rows of wavy lines. |
weave | A woven pattern, like cloth. |
Sizes
| Size | Factor on every pitch |
|---|---|
default | 1 |
fine | 0.75 |
wide | 2 |
Strengths
The percent of ink mixed into the page colour. The ink is foreground or primary.
| Strength | A line | A dot | A block | Foot of gradient |
|---|---|---|---|---|
default | 4% | 7% | 3% | 12% |
faint | 2.5% | 5% | 2% | 7% |
bold | 7% | 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.
| Gate | Rule |
|---|---|
| Ink | ink on ground at 4.5 or better. |
| Dark space | ground is darker than ink. |
| Slots | Slots 1 to 15 on ground at 3 or better. Slot 0 is exempt, because black draws as no colour. |
| Bright set | Slots 3, 7, 11, 15 have a relative luminance above 0.6. |
| The rest | The 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.
| Pair | Floor |
|---|---|
Text on a ground (foreground, muted-foreground, the status chips, status-blocked and destructive as text) | 4.5 |
destructive as an icon | 3 |
rule on background | 1.3 |
| A status colour over its wash, as a chip | 4.5, with the colour over a wash of 15 percent |
status-blocked apart from status-done | a distance of 0.15 |
Typefaces
fonts.ui and fonts.display take one of these words. A theme cannot add a face.
| Word | Face |
|---|---|
system | the system font |
grotesk | Space Grotesk |
aldrich | Aldrich |
plex | IBM Plex Sans |
geist | Geist |
atkinson | Atkinson Hyperlegible Next |
nunito | Nunito |
Characters
The header character, set with the key character at the top level. A theme without it shows Collie.
| Word | Name | What it is |
|---|---|---|
collie | Collie | The collie head in profile, in the ink of the page. The default. |
collie-collar | Collie with collar | The collie head in profile with a white collar, drawn in the colour of the page. |
collie-blaze | Collie with blaze | The collie head in profile with a white blaze, drawn in a soft grey. |
kawaii | Kawaii | A round puppy face from the front, with big glossy eyes and candy pearls. |
kawaii-tilt | Kawaii Tilt | The same puppy with its head tilted. |
pixel | Pixel | An 8-bit collie head with square beads that hop. |
glass | Glass | A collie head in profile as a leaded stained-glass panel, with jewels in the ring. |
glass-front | Glass Front | The same stained glass, the head from the front. |
sheep | Sheep | The sheep the collie herds: a charcoal face in cream wool, in profile. |
owl | Owl | The 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.
| Word | Name | What it is |
|---|---|---|
moves | Moves | The character drifts slowly at rest, while the app is visible. The default. |
still | Still | The 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.
| Word | Name | What it is |
|---|---|---|
lucide | Lucide | Round lines of even width. The default. |
phosphor | Phosphor | Soft and slightly rounder lines. |
phosphor-fill | Phosphor Fill | The Phosphor icons as solid shapes. |
phosphor-duotone | Phosphor Duotone | The Phosphor lines with a pale fill behind them. |
iconoir | Iconoir | Light, open lines. |