Getting Started

Color Usage

The token system follows a two-layer architecture: primitive gray and color scales are defined first, then semantic tokens reference those primitives. All values are CSS custom properties defined in @repo/ui/theme.css and mapped to Tailwind utilities via @theme inline in each app's globals.css. This page documents the semantic tokens you should use in components.

Text

Use the foreground scale to create visual hierarchy in text. The scale ranges from high-contrast body text down to near-invisible muted labels. Never rely solely on color to convey meaning; pair color changes with font-weight or position to maintain accessibility.

The quick brown fox jumps over the lazy dog
text-foregroundhsl(0° 0% 98%)
The quick brown fox jumps over the lazy dog
text-foreground-lighthsl(0° 0% 70.6%)
The quick brown fox jumps over the lazy dog
text-foreground-lighterhsl(0° 0% 53.7%)
The quick brown fox jumps over the lazy dog
text-foreground-mutedhsl(0° 0% 30.2%)
The quick brown fox
text-foreground-contrasthsl(0° 0% 8.6%)
TokenTailwind classUsage
--foreground-defaulttext-foregroundPrimary body text, headings
--foreground-lighttext-foreground-lightSecondary body text, descriptions
--foreground-lightertext-foreground-lighterNav links, placeholders, metadata
--foreground-mutedtext-foreground-mutedCaptions, section labels, timestamps
--foreground-contrasttext-foreground-contrastText placed on colored backgrounds (brand, destructive)

Background

A six-level surface scale creates depth and visual hierarchy across the interface. The background token is the outermost canvas; higher-numbered surfaces sit progressively on top. Use the scale consistently so that visual elevation always matches semantic importance.

bg-background
Main canvashsl(0° 0% 7.1%)
bg-surface-75
Sidebar, action barhsl(0° 0% 9%)
bg-surface-100
Cards, panelshsl(0° 0% 12.2%)
bg-surface-200
Hover states, nested surfaceshsl(0° 0% 12.9%)
bg-surface-300
Stacked layershsl(0° 0% 16.1%)
bg-surface-400
Deepest stacked layerhsl(0° 0% 16.1%)
bg-muted
Muted area backgroundhsl(0° 0% 14.1%)

Border

Five border tokens cover the range from nearly invisible separators to high-contrast strokes for inputs and emphasis. Use the weakest token that still provides sufficient separation at the given depth.

border-border
Default dividers, card edgeshsl(0° 0% 18%)
border-border-muted
Very subtle separatorshsl(0° 0% 14.1%)
border-border-control
Input and form control bordershsl(0° 0% 22.4%)
border-border-strong
Emphasized dividershsl(0° 0% 21.2%)
border-border-stronger
High-contrast dividershsl(0° 0% 27.1%)

Semantic colors

Three semantic scales carry meaning beyond surface and text: brand (the primary green), destructive (errors and delete actions), and warning (cautions and non-critical alerts). Each scale runs from 200 (lightest, used for tinted backgrounds) through 600 (for text on light surfaces), with a -default token for the primary use case.

Brand

Emerald green is the identity color. Use bg-brand for primary buttons and active indicator bars. Use text-brand for link text and icon accents.

bg-brandhsl(153.1° 60.2% 52.7%)
bg-brand-600hsl(154.9° 59.5% 70%)
bg-brand-500hsl(154.9° 100% 19.2%)
bg-brand-400hsl(155.5° 100% 9.6%)
bg-brand-300hsl(155.1° 100% 8%)
bg-brand-200hsl(162° 100% 2%)

Destructive

Used for error states, delete confirmations, and any action that is irreversible. The -200 token is the tinted background for destructive banners; the -default token is the button fill.

bg-destructivehsl(10.2° 77.9% 53.9%)
bg-destructive-600hsl(9.7° 85.2% 62.9%)
bg-destructive-500hsl(7.9° 71.6% 29%)
bg-destructive-400hsl(6.7° 60% 20.6%)
bg-destructive-300hsl(7.5° 51.3% 15.3%)
bg-destructive-200hsl(10.9° 23.4% 9.2%)

Warning

Used for cautionary states and non-critical alerts. Warning does not imply data loss; use destructive for that. Amber fills are most visible against dark surfaces, so apply the full scale consistently.

bg-warninghsl(38.9° 100% 42.9%)
bg-warning-600hsl(38.9° 100% 42.9%)
bg-warning-500hsl(34.8° 90.9% 21.6%)
bg-warning-400hsl(33.2° 100% 14.5%)
bg-warning-300hsl(32.3° 100% 10.2%)
bg-warning-200hsl(36.6° 100% 8%)

Scale convention: -200 tokens are tinted backgrounds for banners and callouts. -300 to -400 are used for borders on those backgrounds. -500 is the muted fill state. -600 is the text color on dark surfaces. The -default token (e.g. bg-brand, bg-destructive) is the primary button or badge fill.