Stark for shadcn/ui

Stark is a shadcn/ui theme built around a deep green primary color (#366818) with deep green accents (#186821). The light mode uses a neutral background (#f9fdf7). Dark mode keeps the deep green primary (#366818) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f9fdf7mintcream
#000000black
Foreground
#060d02black
#ffffffwhite
Card
#f6fcf2honeydew
#030303black
Card foreground
#040901black
#ffffffwhite
Popover
#f6fcf2honeydew
#030303black
Popover foreground
#040901black
#ffffffwhite
Primary
#366818darkolivegreen
#366818darkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#5f6818darkolivegreen
#5f6818darkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e7e7e4gainsboro
#1b1b18black
Muted foreground
#5d5f54dimgray
#aaaba0darkgray
Accent
#186821forestgreen
#186821forestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#942e10saddlebrown
#d44316chocolate
Destructive foreground
#fbe2damistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#366818darkolivegreen
#366818darkolivegreen

Contrast

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

Light mode
Text on background19.17:1AAA
Text on card19.30:1AAA
Primary button6.67:1AA
Secondary button6.04:1AA
Muted text5.24:1AA
Accent6.91:1AA
Destructive6.39:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button6.67:1AA
Secondary button6.04:1AA
Muted text7.43:1AAA
Accent6.91:1AA
Destructive4.55:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.01 133.052);
  --foreground: oklch(0.148 0.031 131.431);
  --muted: oklch(0.927 0.004 111.863);
  --muted-foreground: oklch(0.48 0.017 112.432);
  --popover: oklch(0.985 0.014 133.086);
  --popover-foreground: oklch(0.128 0.026 131.096);
  --card: oklch(0.985 0.014 133.086);
  --card-foreground: oklch(0.128 0.026 131.096);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.465 0.122 136.11);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.493 0.102 116.107);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.454 0.13 144.651);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.452 0.142 36.233);
  --destructive-foreground: oklch(0.931 0.03 37.625);
  --ring: oklch(0.465 0.122 136.11);
  --chart-1: oklch(0.465 0.122 136.11);
  --chart-2: oklch(0.493 0.102 116.107);
  --chart-3: oklch(0.454 0.13 144.651);
  --chart-4: oklch(0.534 0.111 116.163);
  --chart-5: oklch(0.47 0.127 136.286);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.221 0.006 112.274);
  --muted-foreground: oklch(0.737 0.015 112.164);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.465 0.122 136.11);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.493 0.102 116.107);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.454 0.13 144.651);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.586 0.189 35.898);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.465 0.122 136.11);
  --chart-1: oklch(0.465 0.122 136.11);
  --chart-2: oklch(0.493 0.102 116.107);
  --chart-3: oklch(0.454 0.13 144.651);
  --chart-4: oklch(0.534 0.111 116.163);
  --chart-5: oklch(0.47 0.127 136.286);
}