Intent for shadcn/ui

Intent is a shadcn/ui theme built around a green primary color (#31a546) with red accents (#a54631). The light mode uses a neutral background (#fbfdfc). Dark mode keeps the green primary (#31a546) on a neutral background (#020402).

Color palette

TokenLightDark
Background
#fbfdfcwhite
#020402black
Foreground
#040b05black
#f5faf6whitesmoke
Card
#f8fcf9mintcream
#030704black
Card foreground
#030803black
#f8fcf9mintcream
Popover
#f8fcf9mintcream
#030704black
Popover foreground
#030803black
#f8fcf9mintcream
Primary
#31a546seagreen
#31a546seagreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#4631a5darkslateblue
#4631a5darkslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e0dee8gainsboro
#191721black
Muted foreground
#4d4d4ddarkslategray
#b3b3b3darkgray
Accent
#a54631sienna
#a54631sienna
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#a02c08firebrick
#f2420dorangered
Destructive foreground
#fde5ddmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#31a546seagreen
#31a546seagreen

Contrast

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

Light mode
Text on background19.55:1AAA
Text on card19.48:1AAA
Primary button3.18:1AA Large
Secondary button9.33:1AAA
Muted text6.33:1AA
Accent5.94:1AA
Destructive6.10:1AA
Dark mode
Text on background19.53:1AAA
Text on card19.56:1AAA
Primary button3.18:1AA Large
Secondary button9.33:1AAA
Muted text8.46:1AAA
Accent5.94:1AA
Destructive3.76: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.993 0.003 151.363);
  --foreground: oklch(0.14 0.021 150.519);
  --muted: oklch(0.904 0.015 294.525);
  --muted-foreground: oklch(0.418 0 173.29);
  --popover: oklch(0.987 0.006 151.318);
  --popover-foreground: oklch(0.122 0.018 150.577);
  --card: oklch(0.987 0.006 151.318);
  --card-foreground: oklch(0.122 0.018 150.577);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.637 0.168 146.286);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.415 0.176 284.085);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.516 0.13 34.102);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.47 0.158 35.359);
  --destructive-foreground: oklch(0.939 0.029 37.628);
  --ring: oklch(0.637 0.168 146.286);
  --chart-1: oklch(0.637 0.168 146.286);
  --chart-2: oklch(0.415 0.176 284.085);
  --chart-3: oklch(0.516 0.13 34.102);
  --chart-4: oklch(0.435 0.186 283.96);
  --chart-5: oklch(0.644 0.175 146.056);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.012 150.758);
  --foreground: oklch(0.98 0.008 151.296);
  --muted: oklch(0.211 0.021 292.913);
  --muted-foreground: oklch(0.765 0 172.405);
  --popover: oklch(0.121 0.015 150.758);
  --popover-foreground: oklch(0.987 0.005 151.334);
  --card: oklch(0.121 0.015 150.758);
  --card-foreground: oklch(0.987 0.005 151.334);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.637 0.168 146.286);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.415 0.176 284.085);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.516 0.13 34.102);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.636 0.219 34.857);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.637 0.168 146.286);
  --chart-1: oklch(0.637 0.168 146.286);
  --chart-2: oklch(0.415 0.176 284.085);
  --chart-3: oklch(0.516 0.13 34.102);
  --chart-4: oklch(0.435 0.186 283.96);
  --chart-5: oklch(0.644 0.175 146.056);
}