Intent for shadcn/ui

Intent is a shadcn/ui theme built around a deep red primary color (#50322a) with neutral gray accents (#d0cece). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep red primary (#50322a) on a neutral background (#030202).

Color palette

TokenLightDark
Background
#ffffffwhite
#030202black
Foreground
#050101black
#fbf9f9snow
Card
#fcfcfcsnow
#070403black
Card foreground
#000000black
#fdfcfcsnow
Popover
#fcfcfcsnow
#070403black
Popover foreground
#000000black
#fdfcfcsnow
Primary
#50322adarkslategray
#50322adarkslategray
Primary foreground
#e3cfcalightgrey
#e3cfcalightgrey
Secondary
#d0cecelightgrey
#362d2bdarkslategray
Secondary foreground
#373534darkslategray
#d0c6c3silver
Muted
#f5edeblinen
#140c0ablack
Muted foreground
#454140darkslategray
#bfbbbasilver
Accent
#d0cecelightgrey
#362d2bdarkslategray
Accent foreground
#373534darkslategray
#d0c6c3silver
Destructive
#8c1e03darkred
#fa3e0forangered
Destructive foreground
#fecfc3peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#50322adarkslategray
#50322adarkslategray

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background20.76:1AAA
Text on card20.54:1AAA
Primary button7.67:1AAA
Secondary button7.77:1AAA
Muted text8.71:1AAA
Accent7.77:1AAA
Destructive6.47:1AA
Dark mode
Text on background19.74:1AAA
Text on card19.94:1AAA
Primary button7.67:1AAA
Secondary button8.00:1AAA
Muted text10.13:1AAA
Accent8.00:1AAA
Destructive3.64:1AA Large

CSS variables

Paste this into your globals.css to use Intent in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.086 0.016 45.201);
  --muted: oklch(0.951 0.009 34.303);
  --muted-foreground: oklch(0.378 0.006 34.298);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.351 0.047 34.7);
  --primary-foreground: oklch(0.869 0.024 34.299);
  --secondary: oklch(0.852 0.002 34.314);
  --secondary-foreground: oklch(0.33 0.003 34.305);
  --accent: oklch(0.852 0.002 34.314);
  --accent-foreground: oklch(0.33 0.003 34.305);
  --destructive: oklch(0.42 0.149 33.829);
  --destructive-foreground: oklch(0.891 0.056 34.37);
  --ring: oklch(0.351 0.047 34.7);
  --chart-1: oklch(0.351 0.047 34.7);
  --chart-2: oklch(0.852 0.002 34.314);
  --chart-3: oklch(0.852 0.002 34.314);
  --chart-4: oklch(0.876 0.002 34.314);
  --chart-5: oklch(0.351 0.051 34.776);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.089 0.006 37.662);
  --foreground: oklch(0.984 0.002 34.313);
  --muted: oklch(0.166 0.014 34.459);
  --muted-foreground: oklch(0.796 0.005 34.307);
  --popover: oklch(0.113 0.008 37.662);
  --popover-foreground: oklch(0.992 0.001 34.315);
  --card: oklch(0.113 0.008 37.662);
  --card-foreground: oklch(0.992 0.001 34.315);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.351 0.047 34.7);
  --primary-foreground: oklch(0.869 0.024 34.299);
  --secondary: oklch(0.306 0.014 34.327);
  --secondary-foreground: oklch(0.833 0.012 34.299);
  --accent: oklch(0.306 0.014 34.327);
  --accent-foreground: oklch(0.833 0.012 34.299);
  --destructive: oklch(0.646 0.229 33.545);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.351 0.047 34.7);
  --chart-1: oklch(0.351 0.047 34.7);
  --chart-2: oklch(0.306 0.014 34.327);
  --chart-3: oklch(0.306 0.014 34.327);
  --chart-4: oklch(0.336 0.016 34.33);
  --chart-5: oklch(0.351 0.051 34.776);
}