Diminishing Green Swift for shadcn/ui

Diminishing Green Swift is a shadcn/ui theme built around a vivid deep green primary color (#042f07) with muted light green accents (#cbd8cc). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid deep green primary (#042f07) on a green-tinted background (#070e07).

Color palette

TokenLightDark
Background
#ffffffwhite
#070e07black
Foreground
#010401black
#fcfdfcwhite
Card
#ffffffwhite
#070e07black
Card foreground
#010401black
#fcfdfcwhite
Popover
#ffffffwhite
#070e07black
Popover foreground
#010401black
#fcfdfcwhite
Primary
#042f07black
#042f07black
Primary foreground
#12ed24lime
#12ed24lime
Secondary
#cbd8cclightgrey
#1a231bblack
Secondary foreground
#304032darkslategray
#adc2afsilver
Muted
#e1eae1gainsboro
#151e15black
Muted foreground
#4d514edarkslategray
#aeb2afdarkgray
Accent
#cbd8cclightgrey
#1a231bblack
Accent foreground
#304032darkslategray
#adc2afsilver
Destructive
#7a1000maroon
#ff4e33tomato
Destructive foreground
#ffb8adlightpink
#000000black
Border
#f1f3f1whitesmoke
#232924darkslategray
Input
#f1f3f1whitesmoke
#232924darkslategray
Ring
#042f07black
#042f07black

Contrast

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

Light mode
Text on background20.60:1AAA
Text on card20.60:1AAA
Primary button9.26:1AAA
Secondary button7.43:1AAA
Muted text6.56:1AA
Accent7.43:1AAA
Destructive6.65:1AA
Dark mode
Text on background19.19:1AAA
Text on card19.19:1AAA
Primary button9.26:1AAA
Secondary button8.53:1AAA
Muted text7.94:1AAA
Accent8.53:1AAA
Destructive6.39:1AA

CSS variables

Paste this into your globals.css to use Diminishing Green Swift in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.097 0.016 146.858);
  --muted: oklch(0.928 0.016 147.885);
  --muted-foreground: oklch(0.43 0.006 147.911);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.097 0.016 146.858);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.097 0.016 146.858);
  --border: oklch(0.963 0.003 148.028);
  --input: oklch(0.963 0.003 148.028);
  --primary: oklch(0.268 0.081 144.189);
  --primary-foreground: oklch(0.822 0.271 143.053);
  --secondary: oklch(0.868 0.021 147.805);
  --secondary-foreground: oklch(0.353 0.032 147.056);
  --accent: oklch(0.868 0.021 147.805);
  --accent-foreground: oklch(0.353 0.032 147.056);
  --destructive: oklch(0.374 0.142 31.994);
  --destructive-foreground: oklch(0.846 0.084 28.766);
  --ring: oklch(0.268 0.081 144.189);
  --chart-1: oklch(0.268 0.081 144.189);
  --chart-2: oklch(0.868 0.021 147.805);
  --chart-3: oklch(0.868 0.021 147.805);
  --chart-4: oklch(0.89 0.018 147.855);
  --chart-5: oklch(0.27 0.083 144.133);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.152 0.018 147.084);
  --foreground: oklch(0.993 0.001 148.055);
  --muted: oklch(0.224 0.022 146.962);
  --muted-foreground: oklch(0.759 0.005 147.989);
  --popover: oklch(0.152 0.018 147.084);
  --popover-foreground: oklch(0.993 0.001 148.055);
  --card: oklch(0.152 0.018 147.084);
  --card-foreground: oklch(0.993 0.001 148.055);
  --border: oklch(0.274 0.013 147.536);
  --input: oklch(0.274 0.013 147.536);
  --primary: oklch(0.268 0.081 144.189);
  --primary-foreground: oklch(0.822 0.271 143.053);
  --secondary: oklch(0.245 0.021 147.138);
  --secondary-foreground: oklch(0.793 0.036 147.576);
  --accent: oklch(0.245 0.021 147.138);
  --accent-foreground: oklch(0.793 0.036 147.576);
  --destructive: oklch(0.671 0.217 31.616);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.268 0.081 144.189);
  --chart-1: oklch(0.268 0.081 144.189);
  --chart-2: oklch(0.245 0.021 147.138);
  --chart-3: oklch(0.245 0.021 147.138);
  --chart-4: oklch(0.279 0.025 147.076);
  --chart-5: oklch(0.27 0.083 144.133);
}