Skip to content

Vault · Construct

TheChosenVictor Design Tokens

Added
2026-01-10
Category
Construct
  • CSS
  • Tailwind
  • Design System

The actual CSS custom properties powering this site. HSL values without the hsl() wrapper so Tailwind can inject opacity modifiers at build time. Dark-first, because this is a dark site. The gold accent (43 33% 51%) carries the entire brand identity.

When to Use

  • Setting up a dark-first design system with CSS custom properties
  • Integrating custom color tokens with Tailwind's hsl(var(--token)) pattern
  • Maintaining color consistency across components without hardcoding hex values

The Code

:root {
  --background: 0 0% 3.9%;
  --foreground: 0 0% 98%;
  --card: 0 0% 3.9%;
  --card-foreground: 0 0% 98%;
  --popover: 0 0% 3.9%;
  --popover-foreground: 0 0% 98%;
  --primary: 0 0% 98%;
  --primary-foreground: 0 0% 9%;
  --secondary: 0 0% 14.9%;
  --secondary-foreground: 0 0% 98%;
  --muted: 0 0% 14.9%;
  --muted-foreground: 0 0% 63.9%;
  --accent: 0 0% 14.9%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  --border: 0 0% 14.9%;
  --input: 0 0% 14.9%;
  --ring: 0 0% 83.1%;
}

Notes

The values are raw HSL channels (no hsl() wrapper). Your Tailwind config maps them like hsl(var(--primary)), which lets you do bg-primary/50 for 50% opacity variants without defining extra tokens.