@theme (Tailwind v4) and :root (shadcn) layers.
See Theme System for details on the dual-layer architecture and how these tokens integrate with Tailwind v4 and shadcn/ui.
Color Token Reference
All colors are defined insrc/styles/global.css with a dark-only zinc/white minimalist scheme.
Background Colors
Primary surface and container colors.background
@theme:
:root:
hsl(240 5% 4%):root:
240 5% 4%Near-black background, primary surface color for the entire site.card
@theme:
:root:
hsl(240 4% 10%):root:
240 4% 10%Elevated surface color for cards and contained sections.Text Colors
Foreground and text hierarchy colors.foreground
@theme:
:root:
hsl(0 0% 94%):root:
0 0% 94%Primary text color, off-white for readability on dark backgrounds.muted-foreground
@theme:
:root:
hsl(240 5% 65%):root:
240 5% 65%Secondary/muted text color for less prominent content.Semantic Colors
Brand and functional color tokens.Primary
primary
@theme:
:root:
hsl(0 0% 100%):root:
0 0% 100%Pure white, used for primary actions and emphasis.primary-foreground
@theme:
:root:
hsl(0 0% 0%):root:
0 0% 0%Black text for primary buttons (high contrast on white).Secondary
secondary
@theme:
:root:
hsl(240 4% 16%):root:
240 4% 16%Subtle zinc gray for secondary UI elements.secondary-foreground
@theme:
:root:
hsl(0 0% 94%):root:
0 0% 94%Off-white text for secondary elements.Muted
muted
@theme:
:root:
hsl(240 4% 16%):root:
240 4% 16%Background for muted/disabled elements (matches secondary).muted-foreground
@theme:
:root:
hsl(240 5% 65%):root:
240 5% 65%Gray text for muted content.Accent
accent
@theme:
:root:
hsl(240 4% 16%):root:
240 4% 16%Accent background (matches secondary for minimal design).accent-foreground
@theme:
:root:
hsl(0 0% 94%):root:
0 0% 94%Text color for accent elements.Destructive
destructive
@theme:
:root:
hsl(0 72% 51%):root:
0 72% 51%Red for destructive actions and errors.destructive-foreground
@theme:
:root:
hsl(0 0% 100%):root:
0 0% 100%White text on destructive backgrounds.Border & Input Colors
Colors for borders, inputs, and focus rings.border
@theme:
:root:
hsl(240 4% 16%):root:
240 4% 16%Subtle zinc border for cards and dividers.input
@theme:
:root:
hsl(240 4% 16%):root:
240 4% 16%Background for input fields.ring
@theme:
:root:
hsl(0 0% 100%):root:
0 0% 100%White focus ring for accessibility.Complete Token Table
All tokens with both@theme and :root values:
| Token | @theme Value | :root Value | Usage |
|---|---|---|---|
background | hsl(240 5% 4%) | 240 5% 4% | Main background |
foreground | hsl(0 0% 94%) | 0 0% 94% | Primary text |
card | hsl(240 4% 10%) | 240 4% 10% | Card backgrounds |
card-foreground | hsl(0 0% 94%) | 0 0% 94% | Text on cards |
primary | hsl(0 0% 100%) | 0 0% 100% | Primary actions |
primary-foreground | hsl(0 0% 0%) | 0 0% 0% | Text on primary |
secondary | hsl(240 4% 16%) | 240 4% 16% | Secondary UI |
secondary-foreground | hsl(0 0% 94%) | 0 0% 94% | Text on secondary |
muted | hsl(240 4% 16%) | 240 4% 16% | Muted backgrounds |
muted-foreground | hsl(240 5% 65%) | 240 5% 65% | Muted text |
accent | hsl(240 4% 16%) | 240 4% 16% | Accent backgrounds |
accent-foreground | hsl(0 0% 94%) | 0 0% 94% | Text on accent |
destructive | hsl(0 72% 51%) | 0 72% 51% | Error/delete actions |
destructive-foreground | hsl(0 0% 100%) | 0 0% 100% | Text on destructive |
border | hsl(240 4% 16%) | 240 4% 16% | Borders |
input | hsl(240 4% 16%) | 240 4% 16% | Input backgrounds |
ring | hsl(0 0% 100%) | 0 0% 100% | Focus rings |
Usage Examples from Components
Button Component
Fromsrc/components/ui/button.tsx:
src/components/ui/button.tsx
bg-primary+text-primary-foregroundfor default buttonborder-border+text-foregroundfor outline varianttext-muted-foreground+hover:bg-accentfor ghost variantring-ringfor focus states
Card Component
Fromsrc/components/ui/card.tsx:
src/components/ui/card.tsx
border-borderfor subtle card outlinebg-cardfor elevated surfacetext-card-foregroundfor card content
Badge Component
Fromsrc/components/ui/badge.tsx:
src/components/ui/badge.tsx
- All semantic color pairs:
primary,secondary,destructive - Each with matching
-foregroundfor proper contrast
Hero Section
Fromsrc/components/Hero.astro:
src/components/Hero.astro
text-muted-foregroundfor secondary texttext-foregroundfor headings and emphasized spans- Proper text hierarchy with semantic colors
Opacity Modifiers
Tailwind v4 supports opacity modifiers on all color tokens:src/components/Hero.astro:
Custom Color Usage
For one-off colors not in the token system, use arbitrary values:Related Resources
Theme System
Learn about the dual-layer theme architecture
Animations
Animation system and keyframe definitions