Catastrophe for shadcn/ui

Catastrophe is a shadcn/ui theme built around a vivid violet primary color (#650ff0) with vivid green accents (#0ff065). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid violet primary (#650ff0) on a violet-tinted background (#09050f).

Color palette

TokenLightDark
Background
#ffffffwhite
#09050fblack
Foreground
#020104black
#f9f8fcghostwhite
Card
#fcfcfcsnow
#0b0713black
Card foreground
#000000black
#fcfbfdsnow
Popover
#fcfcfcsnow
#0b0713black
Popover foreground
#000000black
#fcfbfdsnow
Primary
#650ff0blueviolet
#650ff0blueviolet
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#f0650fchocolate
#f0650fchocolate
Secondary foreground
#000000black
#000000black
Muted
#e3ddd9gainsboro
#26201cblack
Muted foreground
#4a4a4adarkslategray
#b5b5b5silver
Accent
#0ff065springgreen
#0ff065springgreen
Accent foreground
#033014black
#033014black
Destructive
#cc4e05chocolate
#f96610orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#650ff0blueviolet
#650ff0blueviolet

Contrast

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

Light mode
Text on background20.81:1AAA
Text on card20.54:1AAA
Primary button7.28:1AAA
Secondary button6.57:1AA
Muted text6.57:1AA
Accent9.49:1AAA
Destructive4.50:1AA
Dark mode
Text on background19.05:1AAA
Text on card19.32:1AAA
Primary button7.28:1AAA
Secondary button6.57:1AA
Muted text7.83:1AAA
Accent9.49:1AAA
Destructive6.91:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.079 0.018 304.607);
  --muted: oklch(0.9 0.009 54.367);
  --muted-foreground: oklch(0.409 0 190.305);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.491 0.276 287.117);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.672 0.189 44.578);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.833 0.238 148.201);
  --accent-foreground: oklch(0.272 0.069 151.318);
  --destructive: oklch(0.586 0.174 42.328);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.491 0.276 287.117);
  --chart-1: oklch(0.491 0.276 287.117);
  --chart-2: oklch(0.672 0.189 44.578);
  --chart-3: oklch(0.833 0.238 148.201);
  --chart-4: oklch(0.687 0.181 46.482);
  --chart-5: oklch(0.493 0.281 286.314);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.13 0.024 303.086);
  --foreground: oklch(0.981 0.006 303.555);
  --muted: oklch(0.249 0.013 53.828);
  --muted-foreground: oklch(0.773 0 180);
  --popover: oklch(0.141 0.027 301.533);
  --popover-foreground: oklch(0.991 0.003 303.597);
  --card: oklch(0.141 0.027 301.533);
  --card-foreground: oklch(0.991 0.003 303.597);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.491 0.276 287.117);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.672 0.189 44.578);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.833 0.238 148.201);
  --accent-foreground: oklch(0.272 0.069 151.318);
  --destructive: oklch(0.686 0.197 43.26);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.491 0.276 287.117);
  --chart-1: oklch(0.491 0.276 287.117);
  --chart-2: oklch(0.672 0.189 44.578);
  --chart-3: oklch(0.833 0.238 148.201);
  --chart-4: oklch(0.687 0.181 46.482);
  --chart-5: oklch(0.493 0.281 286.314);
}