Intent for shadcn/ui

Intent is a shadcn/ui theme built around a muted green primary color (#66997d) with neutral gray accents (#ced0ce). The light mode uses a neutral background (#fbfefc). Dark mode keeps the muted green primary (#66997d) on a green-tinted background (#040b07).

Color palette

TokenLightDark
Background
#fbfefcwhite
#040b07black
Foreground
#010402black
#f6f9f7whitesmoke
Card
#f7fdfamintcream
#050f0ablack
Card foreground
#000000black
#f9fbfamintcream
Popover
#fbfefcwhite
#040b07black
Popover foreground
#010402black
#f6f9f7whitesmoke
Primary
#66997dslategray
#66997dslategray
Primary foreground
#000000black
#000000black
Secondary
#ced0celightgrey
#1c2621black
Secondary foreground
#343735darkslategray
#afc5b9silver
Muted
#e5f0ealavender
#0f1a14black
Muted foreground
#3f4b44darkslategray
#b4c0basilver
Accent
#ced0celightgrey
#1c2621black
Accent foreground
#343735darkslategray
#afc5b9silver
Destructive
#7a1705maroon
#f5320forangered
Destructive foreground
#fcc0b6lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#66997dslategray
#66997dslategray

Contrast

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

Light mode
Text on background20.28:1AAA
Text on card20.36:1AAA
Primary button6.41:1AA
Secondary button7.73:1AAA
Muted text7.82:1AAA
Accent7.73:1AAA
Destructive6.82:1AA
Dark mode
Text on background18.72:1AAA
Text on card18.70:1AAA
Primary button6.41:1AA
Secondary button8.50:1AAA
Muted text9.49:1AAA
Accent8.50:1AAA
Destructive3.93:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 162.523);
  --foreground: oklch(0.099 0.016 162.651);
  --muted: oklch(0.946 0.015 162.23);
  --muted-foreground: oklch(0.4 0.02 161.352);
  --popover: oklch(0.994 0.004 162.523);
  --popover-foreground: oklch(0.099 0.016 162.651);
  --card: oklch(0.988 0.008 162.426);
  --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.639 0.069 159.561);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.854 0.003 162.544);
  --secondary-foreground: oklch(0.333 0.004 162.35);
  --accent: oklch(0.854 0.003 162.544);
  --accent-foreground: oklch(0.333 0.004 162.35);
  --destructive: oklch(0.379 0.137 32.23);
  --destructive-foreground: oklch(0.859 0.071 29.99);
  --ring: oklch(0.639 0.069 159.561);
  --chart-1: oklch(0.639 0.069 159.561);
  --chart-2: oklch(0.854 0.003 162.544);
  --chart-3: oklch(0.854 0.003 162.544);
  --chart-4: oklch(0.878 0.002 162.558);
  --chart-5: oklch(0.646 0.079 159.103);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.017 162.48);
  --foreground: oklch(0.979 0.004 162.51);
  --muted: oklch(0.205 0.021 159.802);
  --muted-foreground: oklch(0.797 0.017 162.095);
  --popover: oklch(0.14 0.017 162.48);
  --popover-foreground: oklch(0.979 0.004 162.51);
  --card: oklch(0.157 0.02 160.952);
  --card-foreground: oklch(0.986 0.003 162.546);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.639 0.069 159.561);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.258 0.018 160.712);
  --secondary-foreground: oklch(0.804 0.029 161.687);
  --accent: oklch(0.258 0.018 160.712);
  --accent-foreground: oklch(0.804 0.029 161.687);
  --destructive: oklch(0.628 0.232 31.804);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.639 0.069 159.561);
  --chart-1: oklch(0.639 0.069 159.561);
  --chart-2: oklch(0.258 0.018 160.712);
  --chart-3: oklch(0.258 0.018 160.712);
  --chart-4: oklch(0.292 0.022 160.599);
  --chart-5: oklch(0.646 0.079 159.103);
}