Foundations
Color
The surface, text, line and role colors, what each color means, and the contrast they guarantee.
Color in Raft works in two ways. Surfaces get less color from the outside in: the yellow frame, then the cream sidebar, then white paper where content sits. On top of that, each brand color has one fixed meaning, so a color on screen always tells the person something: who they are, what waits for them, or what a status is. A color that means none of these is removed.
Principles
- Yellow goes on the frame only. The frame is on every screen but nobody reads it, so color there costs almost nothing. Everything people read (messages, lists, cards, the content of pushed pages) sits on paper. The frame is the desktop rail, the web top bar and the top bar of a phone's top-level pages; see Page structure.
- Each color has one meaning. Yellow is you, pink is to do, cyan is this item, orange interrupts, red is irreversible. Status colors are fixed too; see Meanings of color.
- A block of brand color is a sticker. It has an ink edge and ink type on it, in both modes; see Stickers.
- Notices are neutral. Toasts and tooltips are dark gray (
layer-hud), not a brand color, and no button is yellow. A notice is an aside: a yellow toast would compete with selection, and yellow means only "you" (where you are, what you selected, what calls you). That yellow stays yellow in every theme, Boring Gray included: it is information, so it has its own tokens,youandselected(Themes).
Tokens
Surfaces
Surfaces step down in color from the frame inward. In light mode layer-canvas, layer-card and layer-popover are all white and are told apart by lines; in dark mode they are told apart by lightness, each one lighter than the one beneath it.
- Three layers are translucent, by contract.
layer-backdropandlayer-backdrop-nesteddim the page under a modal surface;layer-veilcovers one thing that is busy, so it shows through, dimmed, under a spinner or a line that says what is happening. The veil is the page's color at 80% (white in light mode,layer-canvasin dark), so a default-color Spinner andforegroundtext read on it in both modes. It replaces the card and canvas colors at 75%, 80% and 90% that loading covers used before. Every other layer is opaque. - Dim a thumbnail on the scrim with the nested scrim. The lightbox's thumbnails lie on
layer-backdrop, dark in both modes, and the ones not shown are dimmed withlayer-backdrop-nested(40%), 28% on hover (/70), never a raw black (Lightbox).
Fills are laid into or over a surface: the sunken fill and the hover overlays (Hover overlays).
Text and icons
Lines
There are three kinds of line, and each one means something. See Shape for their widths.
Lines, secondary text and overlays are made from translucent steps of ink. Use the role tokens above; the steps are listed for reference.
Color roles
you and selected are the yellow of the two things yellow means. They have the value of brand in Raft Yellow, but their own, not a reference to it, so a theme that grays the brand keeps them (Themes).
Meanings of color
- Use orange when something goes wrong: red is only for consequences that cannot be undone. An action that interrupts but can be undone, such as archiving, is warning (orange); one that cannot be undone is danger (red).
- Keep warning and danger apart by hue, not only by icon: a warning surface beside a danger surface must read as a different color at a glance. A pale wash of the warning orange reads pink next to danger's, so in light mode
warning-softandwarning-mutedare amber (hue 72, about 50° from danger's 20 to 23, and short of the brand yellow's 92); the solidwarningandwarning-graphicstay orange, set apart from the red by their lightness and saturation. - Use blue (
foreground-link) only for links in running text. It is a deep, quiet blue, close to the link blue of Claude's apps and docs: in light mode it has about half the chroma of a bright link blue, so it sits beside black ink and yellow without being the loudest thing on a page full of links, and it still reads as a link at a glance. Dark mode uses the same blue, lightened to read on the dark canvas. - Lime, lavender and stone only mark a status. Don't use them for anything else.
- Mark only the reader with
you: a mention of them, their search hits, the passage of the comment they opened. A reference to anything else, a message, a thread or an app, takes its chip's own color, even when it is drawn as prominently: a message reference shown as the yellow sticker read as a mention at a glance (artin, 2026-11-09, #triage:71de6c0b).
Warnings in charts
A failure or warning drawn as a graphic, such as a failed route in a migration chart or a failed bar, is filled or stroked with warning-graphic. A chart mark is read by its shape and color alone, with no ink edge, so it needs the 3:1 against what it sits on that WCAG 1.4.11 asks of graphics. The warning sticker orange is 2.04:1 on white: enough with a sticker's edge, too faint for a bare mark.
- Keep the warning hue (50) and change only lightness and chroma, so the mark reads as the same orange as the warning around it.
- Use it for graphics only: a fill, a stroke, a marker, a legend swatch. Text about the failure, a value label or a legend entry's words take
warning-strong, which is deep enough for text;warning-graphicis 3.56:1, under the 4.5:1 text needs. - A failure in a chart is
warning-graphic, notdanger: red is only for what cannot be undone.
Statuses
Tasks have five statuses and presence has five lights. Four of the task statuses and all five lights have a color, and they never change meaning; the fifth status, Backlog, has none. Task statuses are spelled Backlog, Todo, In progress, Done and Closed. In review keeps its color for older tasks still in it (decision 0043).
The sixth presence swatch, presence-busy-soft, is not a light: it is the tint of the Working chip (Soft tints).
- Put a status chip on its
task-status-*-softtint, except Backlog's, which has none. - Give Backlog ("not now") no hue: every hue already has a meaning, and gray is Closed's. Its pixel is hollow: the same 10px square with a 1.5px edge and nothing inside. The edge is
line-strong, not thesticker-inkedge of the filled pixels, which is dark in dark mode and would vanish on the dark canvas without a fill inside it. Its chip is outlined, aline-hairlineborder with no tint, around the hollow pixel and the word inforeground. It differs from the outlined chip of a task reference that isn't loaded yet, which has no pixel andforeground-mutedwords (Referring to a task). - Draw Backlog with raft-ui's parts, never by hand:
TaskStatusIcon(orTaskBacklogIcon) draws the hollow pixel, andTaskChip,TaskStatusBadgeandtaskStatusSoftdraw the outlined chip (Tasks components). presence-busyhas its own value instead of pointing atbrand, so that a change of brand color doesn't change what busy looks like, and neither does a theme: Boring Gray graysbrand, and a working agent stays yellow (Themes). The Working chip's tint,presence-busy-soft, is its own copy ofbrand-softfor the same reason.presence-offlineis stone from the palette, not a default gray: raft-ui doesn't use Tailwind's default palette, so every presence light comes from the same palette.- Presence lights never blink; see Motion.
A read mention is marked by a bare check, not a light, in its own token: read-mark is palette-lime-700 in light mode (6.2:1 on white) and the online lime in dark mode (10.5:1 on the dark canvas). The online lime alone is 1.64:1 on white, enough inside a light's ink edge but not for a bare 10px check (Read receipts on a mention).
Soft tints
A soft tint (*-soft) is a highlight, never a sticker: it has no border.
- Draw status chips and runtime chips as a soft tint, with one square pixel or an icon carrying the saturated color, not as a saturated fill with an ink border. A screen can hold a dozen of them, and when the saturated color is only one pixel large, the screen stays quiet.
- Draw a usage meter
warningfrom 80% used, and keep a used-up one a fullwarningbar, notdanger: an allowance comes back at its reset, so running out interrupts work but isn't irreversible (Meter).
Text selection
Selected text has its own tokens. Two rules hold for every text in the system, in every theme and both modes:
- Selected text stays easy to read: it takes the strongest text of its surface's tone, not its own color. Ink on a light surface, the light foreground on a dark one: 4.5:1 or more against the selection, on every surface.
- The selection shows on the surface it is on: the selected surface differs from the surface by an OKLab ΔE of 5 or more, so it is clear where a selection starts and ends, on a tinted banner, a highlighted row or a yellow mark too.
- Why the text loses its color. A selection is a fill laid over the text's surface, so it lowers the contrast of any text that keeps its own color. Light text on the light fill vanished: a toast's sat at 1.03:1 (Artea, 2026-12-02, #proj-raft-ui:#344). The dark wash lightens what is under it: a hint fell from 6.2:1 to 3.5:1, a link to 3.7:1, a muted note and the status colors to 3.8–4.4:1, a disabled label to 1.5:1 (#proj-raft-ui:#345). The strongest text keeps 5.8:1 or more on every surface. A selected link, hint or code is ink in light mode and the light foreground in dark mode; this is the price of one rule for every text.
- Why 62%.
brand-soft, the light selection before, is the yellow of a highlight, a commented passage and a search hit, and a selection on them didn't show (ΔE 0). 62% is the least that shows (ΔE ≥ 5) on every light surface, those yellows included, in every theme; much more stops showing on a search hit's yellow (75%: ΔE 3.8). Mixed in OKLab: in oklch the mix with the page's hueless white swings to orange. Boring Gray selects in gray (oklch(0.84 0 0)): its lighter gray was the color of its inactive chips. - A dark surface in light mode selects as dark mode does: put
selection-on-darkon it (the HUD's toast, tooltip, drag preview and pane drop overlay have it; an app's label over an image, a lightbox, a dark note add it). The fill isselection-darkand the text the surface's light type,foreground-on-hud. Ink on the light fill was readable but looked like a hole cut in the dark surface (Artea, 2026-12-02, #proj-raft-ui:#344). Ink stays the fallback for a dark surface that doesn't say so. - A surface in the selection's own yellow takes
selection-on-brand: a search hit, a mention of you, a search result's highlighted row. In dark mode the yellow wash doesn't show on yellow (ΔE 0.1), so there the selection is ink over the yellow at 10% (selection-brand,sticker-medium) and the text stays ink; in light mode it is the page's selection, which shows on them. - Controls and labels aren't text to copy: they are
select-none. Buttons, badges, segments, tabs, toggles, sidebar rows, reactions, choice and suggestion rows, checkboxes, and the frame's bars (the top bar, the rail, the phone's heads on the frame). A selection dragged across a page then holds only what people read, and the yellow and pastel stickers of a control, where no selection could show, never carry one. Putselect-noneon the class string that paints the control's fill, even when its root already has it, so the check below sees it.select-noneis for controls and labels only, never a way to make the check pass: a text people read that fails the check gets a selection that works on its surface. A Badge that holds a value people copy (a slash command, a tool name, a version) addsselect-text(Kirby, 2026-12-02, #proj-raft-ui:#345). - raft-ui paints
::selectiononce, for every element (styles.css), and an app adds no rule of its own. A surface with its own selection (the timeline, a comment) sets only the fill (selection:bg-selection). The selection comes with the surface's mode: a highlight reads custom properties from the selected element, so a.darkor.lightisland follows its own mode. selection-audit.browser.test.tsxholds both rules: it reads every text-on-fill pair from the recipes, adds every reading text on every layer, and measures each, selected, in every theme and both modes. A new token, surface or theme that breaks a rule fails it.- One case it can't reach: the passage of an open comment discussion is painted with the Highlight API, yellow with ink type, and a selection over it in dark mode is the light foreground on yellow. A highlight has no element to take
selection-on-brandfrom.
Hover overlays
Hover and press lay a translucent overlay over a control instead of changing its fill, in two tiers; see Hover and press.
fill-subtle is lighter than every selection tint, so a hovered row never looks selected and its text keeps its contrast. The names these tokens had before the two tiers are removed; codemods/token-names.mjs renames them (Tokens).
fill-medium is also the empty track of a Meter or Progress bar. Being translucent, it shows a step darker than whatever the bar sits on: paper, a fill-muted block, an inactive card. An opaque fill-muted track vanished on a fill-muted block, as on a stale usage card (sindresorhus and Kirby, 2026-11-28, #proj-mobile).
Stickers
A sticker is a block of brand color: avatars, the selected item, the location tile, the primary button, badges.
- Give every block of brand color a
line-strongink edge: stickers and paper are only 1.4:1 to 2.8:1 apart, so without an edge a sticker doesn't hold its shape. How wide the edge is depends on the sticker's size and whether it has a label (Stroke widths); a small labeled sticker's thinner edge holds its shape as well. - Put ink type on a sticker (
sticker-ink), never white, in both modes. - Don't invert stickers in dark mode. Sticker colors have the same value in both modes; dark mode adds the die-cut edge instead (see Dark mode).
- Don't put a shadow on a control. The hard sticker shadow is only for brand illustration; see Elevation.
Contrast
foreground,foreground-mutedandforeground-hintare at least 4.5:1 on every surface, every soft tint and every popup, in both modes, and on a hovered row over any of them. There are no exceptions to remember.foreground-hintis slightly darker in light mode and lighter in dark mode than 60% ink, the value the product used before it adopted these tokens, which fails 4.5:1 on some tints and popups. Tertiary text carries times, IDs and counts people need to read, so it gets the same guarantee as body text.- Error text and the border of an invalid input use
danger-strong, a dark red at 6.1:1 on paper. The brighter reds the product used before were 4.2:1 and 2.8:1 on white, below the 4.5:1 text needs. The delete button keepsdanger, because the text on it is ink. - Words in a status color take that family's
-strongtoken, never the sticker color:success-strong,warning-strong,danger-strong,info-strong,attention-strong. Each is at least 4.5:1 on the canvas, the sidebar, a card and a popover, in both modes and every theme. The sticker colors are made for a fill with ink type on it, and as text on whitesuccessis 1.64:1,warning2.03:1 anddanger2.76:1. An icon that goes with the words takes the same ink. A fill with ink on it keeps the sticker color, and a bare mark in a chart takeswarning-graphic(Warnings in charts). - Ink on a sticker is at least 6.8:1.
line-seamis 3.0:1 on white and 2.8:1 on yellow.
Palette
The role tokens point at a small palette. Use the palette directly only where no role fits, such as lavender for people without a photo. The palette tokens are palette-<color>-<step>, with the bare utilities bg-palette-<color>.