Dark green for shadcn/ui

Dark green is a shadcn/ui theme built around a vivid deep green primary color (#0a5221) with vivid deep teal accents (#0a5245). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid deep green primary (#0a5221) on a neutral background (#010402).

Color palette

TokenLightDark
Background
#ffffffwhite
#010402black
Foreground
#020804black
#fcfdfcwhite
Card
#fcfcfcsnow
#030704black
Card foreground
#010402black
#ffffffwhite
Popover
#fcfcfcsnow
#030704black
Popover foreground
#010402black
#ffffffwhite
Primary
#0a5221darkgreen
#0a5221darkgreen
Primary foreground
#9bf3b7palegreen
#9bf3b7palegreen
Secondary
#17520adarkgreen
#17520adarkgreen
Secondary foreground
#abf39bpalegreen
#abf39bpalegreen
Muted
#e3f0e0beige
#121f0fblack
Muted foreground
#455242darkslategray
#b0bdaddarkgray
Accent
#0a5245darkslategray
#0a5245darkslategray
Accent foreground
#9bf3e3paleturquoise
#9bf3e3paleturquoise
Destructive
#b60a07firebrick
#f83d3atomato
Destructive foreground
#fef0f0lavenderblush
#ffffffwhite
Border
#eef1efwhitesmoke
#171c19black
Input
#eef1efwhitesmoke
#171c19black
Ring
#0a5221darkgreen
#0a5221darkgreen

Contrast

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

Light mode
Text on background20.21:1AAA
Text on card20.15:1AAA
Primary button7.07:1AAA
Secondary button7.11:1AAA
Muted text7.00:1AAA
Accent7.06:1AAA
Destructive6.23:1AA
Dark mode
Text on background20.21:1AAA
Text on card20.24:1AAA
Primary button7.07:1AAA
Secondary button7.11:1AAA
Muted text8.74:1AAA
Accent7.06:1AAA
Destructive3.67:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.124 0.021 156.084);
  --muted: oklch(0.941 0.025 139.967);
  --muted-foreground: oklch(0.422 0.031 139.93);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.099 0.017 156.084);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.099 0.017 156.084);
  --border: oklch(0.956 0.003 156.489);
  --input: oklch(0.956 0.003 156.489);
  --primary: oklch(0.385 0.105 148.329);
  --primary-foreground: oklch(0.893 0.12 153.513);
  --secondary: oklch(0.386 0.118 140.675);
  --secondary-foreground: oklch(0.896 0.138 139.914);
  --accent: oklch(0.394 0.07 176.27);
  --accent-foreground: oklch(0.904 0.089 181.317);
  --destructive: oklch(0.491 0.197 29.081);
  --destructive-foreground: oklch(0.967 0.015 18.604);
  --ring: oklch(0.385 0.105 148.329);
  --chart-1: oklch(0.385 0.105 148.329);
  --chart-2: oklch(0.386 0.118 140.675);
  --chart-3: oklch(0.394 0.07 176.27);
  --chart-4: oklch(0.429 0.132 140.744);
  --chart-5: oklch(0.389 0.107 148.087);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.012 156.236);
  --foreground: oklch(0.993 0.001 156.537);
  --muted: oklch(0.221 0.034 139.914);
  --muted-foreground: oklch(0.784 0.027 139.96);
  --popover: oklch(0.122 0.015 156.236);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.122 0.015 156.236);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.219 0.008 155.805);
  --input: oklch(0.219 0.008 155.805);
  --primary: oklch(0.385 0.105 148.329);
  --primary-foreground: oklch(0.893 0.12 153.513);
  --secondary: oklch(0.386 0.118 140.675);
  --secondary-foreground: oklch(0.896 0.138 139.914);
  --accent: oklch(0.394 0.07 176.27);
  --accent-foreground: oklch(0.904 0.089 181.317);
  --destructive: oklch(0.645 0.223 26.835);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.385 0.105 148.329);
  --chart-1: oklch(0.385 0.105 148.329);
  --chart-2: oklch(0.386 0.118 140.675);
  --chart-3: oklch(0.394 0.07 176.27);
  --chart-4: oklch(0.429 0.132 140.744);
  --chart-5: oklch(0.389 0.107 148.087);
}