Skip to main content

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
#3F6DAE

Dark​

--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
TokenFor
--ui-bgpage background
--ui-surfacewhite cards, fields, menus
--ui-sunkensunken areas: tab bar, keyboard shortcuts, loading areas
--ui-inktext, primary button
--ui-mutedsecond lines, hints, placeholders
--ui-line, --ui-line-softborders and dividers
--ui-focusthe 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.

Blue
blau
tint #DCE8F6
ink #2E4F7C
strong #5B86C4
Mint
petrol
tint #D5EEE6
ink #1F5F55
strong #49A08F
Sage
gruen
tint #E3EED7
ink #3F5E2A
strong #84AE5F
Butter
gelb
tint #FBEFC6
ink #7A5D10
strong #E2B53E
Peach
orange
tint #FBE1D3
ink #8A3F22
strong #E08A5E
Rose
rot
tint #F8DEDF
ink #8C2F3A
strong #D9707B
Lavender
violett
tint #E7E0F6
ink #4E3F86
strong #8B74C9
Stone
grau
tint #E9E4DC
ink #4D4943
strong #9A9286
Blue
blau
tint #243243
ink #C3D7F1
strong #7FA6DB
Mint
petrol
tint #1F3631
ink #B5E3D5
strong #5DBBA8
Sage
gruen
tint #2A3424
ink #CFE3BA
strong #9BC478
Butter
gelb
tint #3A321A
ink #F3DE9C
strong #E9C35A
Peach
orange
tint #3E2A21
ink #F6CBB3
strong #EE9F76
Rose
rot
tint #3F2427
ink #F4C3C8
strong #E58A93
Lavender
violett
tint #2D2840
ink #D6CCF2
strong #A28FDB
Stone
grau
tint #312D28
ink #DCD5CA
strong #A39A8C

Every colour has four steps:

StepTokenFor
tint--ui-blau-tintsurface of a card, a chip, a tile
glow--ui-blau-glowlighter centre in the gradient of large cards
ink--ui-blau-inktext and icons on the surface
strong--ui-blau-strongdots, 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:

Result
Loading...
Live Editor
<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.