Skip to content
HomeCobalt

Colors

Greys and one accent colour. The page is a light cool grey, and surfaces on it are white. Text is near-black. One grey fills every flat control. The accent is one hue, set in one place. Other colours appear only where they carry a named meaning, such as good and bad data, a warning, a destructive action, a file's kind or a chart's series. A tooltip uses its own dark grey, --tip, in both themes.

Tokens

  • --backgroundThe page: a faintly cool off-whiteoklch(0.976 0.003 264)Dark: oklch(0.145 0 0)
  • --foregroundText, and the fill of a toggle, pill or chip that is onoklch(0.145 0 0)Dark: oklch(0.985 0 0)
  • --cardA white surface on the page, with no border and no shadowoklch(1 0 0)Dark: oklch(0.205 0 0)
  • --card-foregroundText on a cardvar(--foreground)
  • --popoverA floating surface: popover, menu, sheet, toastoklch(1 0 0)Dark: oklch(0.205 0 0)
  • --popover-foregroundText on a floating surfacevar(--foreground)
  • --mutedThe grey fill: a pill or chip that is off, a segmented control's or tabs' track, a row under the pointeroklch(0.948 0.004 264)Dark: oklch(0.269 0 0)
  • --thumbThe selection that slides in a grey track: a segmented control's, the active tab's, the nav's. Always lighter than the trackvar(--card)Dark: oklch(0.37 0 0)
  • --muted-foregroundSecondary text; 5.5:1 on --muted, 4.7:1 on --borderoklch(0.5 0 0)Dark: oklch(0.708 0 0)
  • --secondaryThe secondary button's fill, the same greyvar(--muted)
  • --secondary-foregroundText on the secondary filloklch(0.205 0 0)Dark: oklch(0.985 0 0)
  • --accentA menu, select or list row under the pointer or the arrow keys, the same greyvar(--muted)
  • --accent-foregroundText on the hover filloklch(0.205 0 0)Dark: oklch(0.985 0 0)
  • --borderA 1px line, used where spacing cannot separate two thingsoklch(0.915 0.004 264)Dark: oklch(1 0 0 / 10%)
  • --inputA field's fill, drawn at half opacityvar(--border)Dark: oklch(1 0 0 / 15%)
  • --ringKeyboard focus: a thin neutral outline on every control but a text field, which draws the accent edge (D40)oklch(0.145 0 0 / 70%)Dark: oklch(0.985 0 0 / 70%)
  • --hoverA tint on whatever is under the pointer, and the press tint `pressable` drawsoklch(0.145 0 0 / 5%)Dark: oklch(1 0 0 / 6%)
  • --scrimThe page behind a dialog or sheetoklch(0 0 0 / 20%)Dark: oklch(0 0 0 / 50%)
  • --tipA tooltip's fill, dark in both themes; every chart swatch holds 3:1 on itoklch(0.18 0 0)Dark: oklch(0.27 0 0)
  • --tip-foregroundText on a tooltipoklch(0.985 0 0)
  • --primaryThe accent colour as a fill: the primary button, a checked checkbox, radio or switch, a picked calendar day, a progress baroklch(0.5 0.12 262)Dark: oklch(0.72 0.11 262)
  • --primary-foregroundText on the accentoklch(1 0 0)Dark: oklch(0.18 0.03 262)
  • --primary-inkThe accent as text and as a small mark: a link, the check on a chosen menu or select row, today in a calendarvar(--primary)Dark: oklch(0.76 0.1 262)
  • --primary-softA light accent tint behind a selected list or table row, a calendar range's band and an info alert, from the accentcolor-mix(in oklab, var(--primary) 9%, transparent)Dark: color-mix(in oklab, var(--primary) 14%, transparent)
  • --primary-hoverThe accent fill under the pointercolor-mix(in oklab, var(--primary), oklch(0 0 0) 10%)
  • --secondary-hoverA grey fill under the pointer: a secondary button, a pill or chip that is offcolor-mix(in oklch, var(--secondary), var(--foreground) 5%)
  • --muted-hoverThe same step for the muted fillvar(--secondary-hover)
  • --destructiveAn action that removes something, an error and an invalid field: red text on a light red wash, 4.7:1 on that wash over the pageoklch(0.49 0.245 27.325)Dark: oklch(0.704 0.191 22.216)
  • --goodData that went the right way: up, matched, verified; 4.5:1 on its own soft chipoklch(0.48 0.14 152)Dark: oklch(0.76 0.13 152)
  • --badData that went the wrong way: down, failed, overdueoklch(0.53 0.17 27)Dark: oklch(0.72 0.15 27)
  • --warningText that warns: a limit near, a sync behindoklch(0.5 0.11 70)Dark: oklch(0.83 0.12 80)
  • --warning-softThe fill behind a warningoklch(0.95 0.05 85)Dark: oklch(0.3 0.06 75)
  • --bubbleA message from someone elsevar(--muted)
  • --bubble-foregroundText in their bubblevar(--foreground)
  • --bubble-mineA message you sentvar(--foreground)
  • --bubble-mine-foregroundText in your bubblevar(--background)
  • --sidebarA stock shadcn sidebar's fill: the pagevar(--background)
  • --sidebar-foregroundText in a stock shadcn sidebarvar(--foreground)
  • --sidebar-primaryA stock shadcn sidebar's accentvar(--primary)
  • --sidebar-primary-foregroundText on that accentvar(--primary-foreground)
  • --sidebar-accentA stock shadcn sidebar row under the pointervar(--muted)
  • --sidebar-accent-foregroundText on that rowvar(--foreground)
  • --sidebar-borderA stock shadcn sidebar's linesvar(--border)
  • --sidebar-ringA stock shadcn sidebar's focusvar(--ring)
  • --file-otherA file icon's sheet: a file of no known kind. The file kinds are the same in both themesoklch(0.606 0.016 264)
  • --file-documentA file icon's sheet: a text documentoklch(0.603 0.176 260)
  • --file-spreadsheetA file icon's sheet: a spreadsheetoklch(0.628 0.142 155)
  • --file-presentationA file icon's sheet: a slide deckoklch(0.692 0.156 47)
  • --file-pdfA file icon's sheet: a PDFoklch(0.612 0.193 27)
  • --file-imageA file icon's sheet: an imageoklch(0.611 0.2 302)
  • --file-codeA file icon's sheet: source codeoklch(0.504 0.043 260)
  • --file-archiveA file icon's sheet: an archiveoklch(0.704 0.13 81)
  • --file-audioA file icon's sheet: audiooklch(0.622 0.19 356)
  • --file-videoA file icon's sheet: videooklch(0.563 0.198 276)
  • --file-inkThe white mark drawn on a file icon's coloured sheetvar(--on-photo)
  • --hue-bgA tag's fill from --h, grey when --c is 0oklch(0.95 calc(var(--c, 1) * 0.035) var(--h, 0))Dark: oklch(0.3 calc(var(--c, 1) * 0.05) var(--h, 0))
  • --hue-bg-hoverThe same fill under the pointeroklch(0.925 calc(var(--c, 1) * 0.045) var(--h, 0))Dark: oklch(0.34 calc(var(--c, 1) * 0.055) var(--h, 0))
  • --hue-fgA tag's text from --hoklch(0.42 calc(var(--c, 1) * 0.11) var(--h, 0))Dark: oklch(0.87 calc(var(--c, 1) * 0.08) var(--h, 0))
  • --chart-1The first series: the accentvar(--primary)
  • --chart-2The second series: tealoklch(0.62 0.11 185)Dark: oklch(0.62 0.105 185)
  • --chart-3The third series: orangeoklch(0.6 0.15 55)Dark: oklch(0.74 0.14 55)
  • --chart-4The fourth series: violetoklch(0.55 0.17 300)Dark: oklch(0.72 0.15 300)
  • --chart-5The fifth series: amberoklch(0.65 0.13 80)Dark: oklch(0.8 0.14 80)
  • --chart-6The sixth series: magentaoklch(0.55 0.17 345)Dark: oklch(0.7 0.15 345)
  • --chart-spareA blue no fixed series uses: an accent preset whose hue sits near a series points that series here, so no two series share a colouroklch(0.55 0.15 262)Dark: oklch(0.72 0.11 262)
  • --chart-previousA comparison series, such as the year before, always dashed; 3.4:1 on --cardoklch(0.64 0 0)Dark: oklch(0.55 0 0)
  • --chart-gridGridlines behind the markscolor-mix(in oklch, var(--border) 70%, transparent)

Rules