Tragedy for shadcn/ui

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

Color palette

TokenLightDark
Background
#f9fdf7mintcream
#000000black
Foreground
#070c04black
#f7faf5whitesmoke
Card
#f6fcf2honeydew
#030303black
Card foreground
#040802black
#f9fbf8mintcream
Popover
#f9fdf7mintcream
#000000black
Popover foreground
#070c04black
#f7faf5whitesmoke
Primary
#19330adarkgreen
#19330adarkgreen
Primary foreground
#6fd534yellowgreen
#6fd534yellowgreen
Secondary
#e8e9e7linen
#333531darkslategray
Secondary foreground
#4e514ddarkslategray
#cccecalightgrey
Muted
#d9e4d3gainsboro
#212c1bblack
Muted foreground
#4c4e4bdarkslategray
#b2b4b1darkgray
Accent
#d3d8d0lightgrey
#475440darkslategray
Accent foreground
#394035darkslategray
#e2e7dfgainsboro
Destructive
#6f1a0bmaroon
#d13115firebrick
Destructive foreground
#f8bfb5lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#19330adarkgreen
#19330adarkgreen

Contrast

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

Light mode
Text on background19.23:1AAA
Text on card19.38:1AAA
Primary button7.41:1AAA
Secondary button6.59:1AA
Muted text6.39:1AA
Accent7.37:1AAA
Destructive7.14:1AAA
Dark mode
Text on background19.94:1AAA
Text on card19.87:1AAA
Primary button7.41:1AAA
Secondary button7.86:1AAA
Muted text6.95:1AA
Accent6.43:1AA
Destructive5.05:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.01 133.668);
  --foreground: oklch(0.143 0.022 132.282);
  --muted: oklch(0.906 0.026 133.785);
  --muted-foreground: oklch(0.421 0.006 133.689);
  --popover: oklch(0.99 0.01 133.668);
  --popover-foreground: oklch(0.143 0.022 132.282);
  --card: oklch(0.985 0.015 133.7);
  --card-foreground: oklch(0.125 0.019 132.162);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.289 0.072 136.11);
  --primary-foreground: oklch(0.782 0.214 136.777);
  --secondary: oklch(0.932 0.002 133.62);
  --secondary-foreground: oklch(0.432 0.009 133.731);
  --accent: oklch(0.875 0.012 133.691);
  --accent-foreground: oklch(0.361 0.02 133.961);
  --destructive: oklch(0.361 0.122 32.34);
  --destructive-foreground: oklch(0.852 0.067 29.96);
  --ring: oklch(0.289 0.072 136.11);
  --chart-1: oklch(0.289 0.072 136.11);
  --chart-2: oklch(0.932 0.002 133.62);
  --chart-3: oklch(0.875 0.012 133.691);
  --chart-4: oklch(0.955 0.001 133.615);
  --chart-5: oklch(0.292 0.074 136.245);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.981 0.007 133.649);
  --muted: oklch(0.278 0.034 134.461);
  --muted-foreground: oklch(0.768 0.005 133.645);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.981 0.007 133.649);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.987 0.005 133.634);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.289 0.072 136.11);
  --primary-foreground: oklch(0.782 0.214 136.777);
  --secondary: oklch(0.324 0.006 133.721);
  --secondary-foreground: oklch(0.848 0.005 133.64);
  --accent: oklch(0.428 0.035 134.142);
  --accent-foreground: oklch(0.921 0.011 133.68);
  --destructive: oklch(0.564 0.2 32.15);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.289 0.072 136.11);
  --chart-1: oklch(0.289 0.072 136.11);
  --chart-2: oklch(0.324 0.006 133.721);
  --chart-3: oklch(0.428 0.035 134.142);
  --chart-4: oklch(0.354 0.007 133.724);
  --chart-5: oklch(0.292 0.074 136.245);
}