โ† Deepweek case study
Design system ยท Deepweek

Deepweek's design system: one set of tokens, four themes

The tokens behind Deepweek's Light, Dark, Bloom and Piano themes: what they are, how they're used, and how I keep them consistent as the product grows.

Role
Design and front-end development
Scope
Color, type, motion and components
Themes
Light, Dark, Bloom and Piano
Links
Live site โ†—Stylesheet โ†—

Overview

Deepweek is a planner in daily use by real users, so its interface has to stay consistent while new features keep shipping. The system that makes that possible is deliberately small: one stylesheet, a 12-step color scale, a 9-step type scale and two easing curves.

The core idea is that a theme is just a different set of values for the same tokens. Components never ask "which theme am I in?" They use --text for text and --surface for surfaces, and each theme decides what those mean. A feature designed once works in all four themes.

Color

Color runs on an ink scale from --text to --surface, plus --accent. These eight tokens do most of the work. The full scale has twelve steps.

Deepweek color tokens and their values in each theme
TokenLightDarkBloomPiano
--textPrimary text, icons, filled buttons#0A0A0A#FFFFFF#4B3A4F#1C1A17
--ink-700Secondary text#404040#C4C4C4#6F5A68#46423C
--ink-500Muted labels and hints#737373#A0A0A0#7E6676#6A6358
--ink-300Strong borders#D4D4D4#353535#EBD3DA#DDD5C5
--ink-200Borders and dividers#E5E5E5#2A2A2A#F3E2E6#EAE4D7
--ink-100Hover and subtle fills#F5F5F5#1A1A1A#FBEEF1#F3EEE3
--surfacePage and card surfaces#FFFFFF#0F0F0F#FFFDFC#FFFDF8
--accentCheckboxes, highlights#0A0A0A#FFFFFF#D98BA5#9A7633

Every theme passes WCAG AA for text. Primary text against the page surface measures 19.8:1 in Light, 19.2:1 in Dark, 10.3:1 in Bloom and 17.1:1 in Piano. The muted labels, the hardest case, measure 4.7:1, 7.3:1, 5.1:1 and 5.8:1, all above the 4.5:1 minimum.

Named by role. The tokens used to be named after their light-mode colors, so in Dark mode --black held white. I renamed them by role: --text, --surface, and an ink scale from --ink-900, closest to the text, to --ink-50, closest to the surface. Every name now stays true in every theme.

Type

Deepweek pairs two typefaces: Manrope for reading text and IBM Plex Mono for structure, like labels, buttons and the timer. Every font size comes from a nine-step scale, so text sizes stay consistent across views.

Deepweek type scale
TokenSizeSample and use
--size-display42pxPlan the weekPage title
--size-2xl32pxPlan the weekFocus timer, focused day
--size-xl24pxPlan the weekDay names, dialog titles
--size-lg20pxPlan the weekDates and numbers
--size-md16pxPlan the weekSection titles
--size-base14pxPlan the weekTask text, inputs, body copy
--size-sm12pxPlan the weekHints, compact labels
--size-xs11pxPlan the weekButtons, weekday labels
--size-2xs10pxPlan the weekMono labels and counts

Samples are shown in this site's typeface.

Motion

Motion is quiet and short. Two easing tokens cover the whole app:

  • --ease-out (cubic-bezier(0.33, 1, 0.68, 1)) for almost everything. Hover and state changes take 0.2 seconds, toasts 0.3 seconds, and the page's entrance 0.6 seconds.
  • --ease-in-out (cubic-bezier(0.65, 0, 0.35, 1)) for movements that start and stop in place.

Reduced motion is respected everywhere. When someone turns on "Reduce motion" in their system settings, every animation and transition finishes instantly. Content still appears; it just doesn't move.

Components

Every component is built from the same tokens, so it changes with the theme. Each state is designed on purpose rather than left to the browser.

Buttons

Three kinds, one family, all set in IBM Plex Mono and uppercase.

  • Outline buttons (Start, Reset, Export): a --ink-300 border on a clear fill. On hover they fill with --text and the text flips to --surface.
  • Dialog buttons: the primary action is filled with --text and the secondary one uses --ink-200, so the main choice always stands out.
  • View switcher: a segmented control inside a --ink-300 border. The selected view fills with --text and is marked with aria-pressed, so screen readers announce which view is on.
Deepweek's focus timer with a filled Start button shown on hover next to an outlined Reset button, and the view switcher with Week selected in black
Outline buttons at rest (Reset) and on hover (Start), and the view switcher with Week selected.

Task rows

  • At rest: a --ink-50 fill, a --ink-200 border and an 8px radius.
  • Hover: the row lifts to --surface with a --ink-300 border.
  • Done: struck through and faded to 50%, so finished work recedes without disappearing.
  • Chips: time and estimate show their value when set, and a "+ Time" or "+ Est" prompt when empty.
A Deepweek day card with three task rows: a finished task struck through and faded, a hovered task with a white background and darker border, and a task at rest with empty Est and Time chips
Task rows: done, hovered and at rest. Shown with sample data.

Calendar blocks

  • Scheduled: filled with --text and --surface text, sized by the task's estimate.
  • Done: an outlined --surface block with --ink-500 text, so the work that's left stands out.
  • Focused: a block expands to show its full title, so short blocks stay readable for keyboard users.
  • In Bloom and Piano, each section gets its own color and keeps it all week.
Deepweek calendar blocks: three finished tasks at 10 AM as outlined blocks with gray struck-through text, and black Usability session blocks at 11 AM, one of them expanded with a focus ring
Calendar blocks: done at 10 AM, scheduled at 11 AM, and one expanded by keyboard focus. Shown with sample data.

Inputs and focus

Text inputs use a --ink-300 border that darkens to --text on focus, with a soft ring around it.

Keyboard focus is always visible. While documenting this page, I found that buttons relied on each browser's default focus ring, and the time and estimate chips hid focus completely, so a keyboard user couldn't tell where they were. I added one focus style for every button, link and chip: a 2px outline in the theme's text color, so it adapts to all four themes.

How I maintain it

A design system is only useful if it stays true as the product changes. Here is how Deepweek's has grown, and what I did when it drifted.

Adding themes without touching components

Deepweek started with a light theme built on a gray scale of color tokens. When I added Bloom and later Piano, I didn't restyle screens. Each theme redefines the same tokens, so every component changed at once. Reminders were built separately, and they picked up Bloom's colors with no extra work.

An audit, and what it found

Before writing this page, I audited the stylesheet against the system it was supposed to follow. Products that grow feature by feature drift, and Deepweek had. I found four gaps and fixed each one before documenting it:

What the audit found and what changed
GapBeforeAfter
Dark mode96 separate overrides, written before the token approachOne block that redefines the tokens, like every other theme
Type15 different font sizesA 9-step scale used by all 83 font sizes
MotionNo reduced-motion supportAnimations and transitions respect the system setting
FocusBrowser default rings, and none at all on the time and estimate chipsOne visible focus ring for every button, link and chip

The cleanup removed about 470 lines from the stylesheet, which went from roughly 3,130 lines to 2,660. Moving dark mode onto tokens also fixed two bugs that had gone unnoticed: the progress bar looked full at any percentage, and the marker for the selected week was black on black.

Then I renamed the tokens by role. With every theme on the same tokens, the old color names became misleading, so --black became --text, --white became --surface, and the grays became an ink scale. It touched about 335 references, and screenshots of all four themes in every view came out identical before and after.

How I check a change

  • Before and after, in every view. I load the same sample week in Day, Week, Month and Calendar, take screenshots before and after a change, and compare them. The dark mode refactor matched about 99% of pixels, and I reviewed every difference by eye.
  • Contrast from the real values. I measure contrast from the token values in the code, not from a mockup, so the numbers on this page are what users actually see.
  • Installed copies update. Deepweek works offline, so every release bumps its cache version. Otherwise people who installed it would keep the old styles.

The rules for adding to it

  • A new color becomes a token with a value in all four themes, or it doesn't ship.
  • A new text size comes from the scale. If nothing fits, the scale changes on purpose, in one place.
  • Every interactive element gets designed hover and focus states, and text passes 4.5:1 contrast in every theme.

What's next

  • Color for status. Test a narrow, deliberate use of color for done, overdue and in progress, without breaking the calm the palette was built for.
~/contact

I design it, build it, and keep improving it after launch.

Send me a message