Colours
All colours are tokens: CSS variables with the prefix --ui-, for light and dark. The values are in one single place, packages/ui/src/tokens.ts; tokens.css is generated from it. A test checks that every text has a contrast of at least 4.5 : 1.
Background and text
A warm, light background instead of white; white surfaces (surface) stand out from it gently.
Light
--ui-bg#F7F2EA--ui-surface#FFFDF9--ui-sunken#EFE7DB--ui-ink#2A2620--ui-muted#6E665B--ui-line#E2D7C6--ui-line-soft#EDE5D8--ui-focus#3F6DAEDark
--ui-bg#1E1B17--ui-surface#29251F--ui-sunken#332E27--ui-ink#F3ECE2--ui-muted#B3A999--ui-line#3D372F--ui-line-soft#332E27--ui-focus#8FB3E6| Token | For |
|---|---|
--ui-bg | page background |
--ui-surface | white cards, fields, menus |
--ui-sunken | sunken areas: tab bar, keyboard shortcuts, loading areas |
--ui-ink | text, primary button |
--ui-muted | second lines, hints, placeholders |
--ui-line, --ui-line-soft | borders and dividers |
--ui-focus | the focus ring |
Course colours
Every course has one of eight colours. The names in code are the ones stored in the database; they are shown with the names below them.
blautint #DCE8F6
ink #2E4F7C
strong #5B86C4
petroltint #D5EEE6
ink #1F5F55
strong #49A08F
gruentint #E3EED7
ink #3F5E2A
strong #84AE5F
gelbtint #FBEFC6
ink #7A5D10
strong #E2B53E
orangetint #FBE1D3
ink #8A3F22
strong #E08A5E
rottint #F8DEDF
ink #8C2F3A
strong #D9707B
violetttint #E7E0F6
ink #4E3F86
strong #8B74C9
grautint #E9E4DC
ink #4D4943
strong #9A9286
blautint #243243
ink #C3D7F1
strong #7FA6DB
petroltint #1F3631
ink #B5E3D5
strong #5DBBA8
gruentint #2A3424
ink #CFE3BA
strong #9BC478
gelbtint #3A321A
ink #F3DE9C
strong #E9C35A
orangetint #3E2A21
ink #F6CBB3
strong #EE9F76
rottint #3F2427
ink #F4C3C8
strong #E58A93
violetttint #2D2840
ink #D6CCF2
strong #A28FDB
grautint #312D28
ink #DCD5CA
strong #A39A8C
Every colour has four steps:
| Step | Token | For |
|---|---|---|
| tint | --ui-blau-tint | surface of a card, a chip, a tile |
| glow | --ui-blau-glow | lighter centre in the gradient of large cards |
| ink | --ui-blau-ink | text and icons on the surface |
| strong | --ui-blau-strong | dots, rings, filled icons – never for text |
strong does not reach 3 : 1 on white everywhere (butter is light). So what it shows is always also next to it as text or in the aria-label.
One colour for an area
ui-tone-<colour> sets --ui-tone-tint, --ui-tone-glow, --ui-tone-ink and --ui-tone-strong for everything inside. Components with a tone prop do this themselves:
<Card tone="petrol" style={{ display: "flex", gap: 16, alignItems: "center" }}> <ProgressRing value={0.71} label="71 percent" tone="petrol" onTint size={56}>71</ProgressRing> <div> <strong>Materials Science</strong> <div><Chip tone="petrol" onTint>MS</Chip></div> </div> </Card>
Meanings
States use course colours: info blue, success sage, warning butter, error rosé (STATUS in tokens.ts). The text says what counts – never the colour alone.
Rules
- No colour as a hex value in the app – always a token.
- Pastel surfaces get no shadow; only white surfaces do.
- One, at most two cards with gradient and grain (
glow,grain) per page.