Devastation for shadcn/ui

Devastation is a shadcn/ui theme built around a green primary color (#529735) with violet accents (#7a3597). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#529735) on a neutral background (#020401).

Color palette

TokenLightDark
Background
#ffffffwhite
#020401black
Foreground
#020401black
#ffffffwhite
Card
#ffffffwhite
#020401black
Card foreground
#020401black
#ffffffwhite
Popover
#ffffffwhite
#020401black
Popover foreground
#020401black
#ffffffwhite
Primary
#529735olivedrab
#529735olivedrab
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#7a3597rebeccapurple
#7a3597rebeccapurple
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e4d8e9gainsboro
#221627black
Muted foreground
#443649darkslategray
#c3b6c9silver
Accent
#7a3597rebeccapurple
#7a3597rebeccapurple
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#c85314chocolate
#ed8045coral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#529735olivedrab
#529735olivedrab

Contrast

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

Light mode
Text on background20.58:1AAA
Text on card20.58:1AAA
Primary button3.59:1AA Large
Secondary button7.55:1AAA
Muted text8.15:1AAA
Accent7.55:1AAA
Destructive4.48:1AA Large
Dark mode
Text on background20.57:1AAA
Text on card20.57:1AAA
Primary button3.59:1AA Large
Secondary button7.55:1AAA
Muted text8.96:1AAA
Accent7.55:1AAA
Destructive7.75:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.1 0.019 134.194);
  --muted: oklch(0.896 0.027 315.913);
  --muted-foreground: oklch(0.356 0.037 315.648);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.1 0.019 134.194);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.1 0.019 134.194);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.61 0.15 137.618);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.466 0.161 314.213);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.466 0.161 314.213);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.585 0.164 43.358);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.61 0.15 137.618);
  --chart-1: oklch(0.61 0.15 137.618);
  --chart-2: oklch(0.466 0.161 314.213);
  --chart-3: oklch(0.466 0.161 314.213);
  --chart-4: oklch(0.491 0.171 314.189);
  --chart-5: oklch(0.617 0.157 137.754);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.1 0.018 134.276);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.224 0.038 315.378);
  --muted-foreground: oklch(0.792 0.03 315.885);
  --popover: oklch(0.1 0.018 134.276);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.1 0.018 134.276);
  --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.61 0.15 137.618);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.466 0.161 314.213);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.466 0.161 314.213);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.71 0.152 47.069);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.61 0.15 137.618);
  --chart-1: oklch(0.61 0.15 137.618);
  --chart-2: oklch(0.466 0.161 314.213);
  --chart-3: oklch(0.466 0.161 314.213);
  --chart-4: oklch(0.491 0.171 314.189);
  --chart-5: oklch(0.617 0.157 137.754);
}