Tragic for shadcn/ui

Tragic is a shadcn/ui theme built around a light purple primary color (#f5e7f9) with light green accents (#ebf9e7). The light mode uses a neutral background (#ffffff). Dark mode keeps the light purple primary (#f5e7f9) on a neutral background (#030104).

Color palette

TokenLightDark
Background
#ffffffwhite
#030104black
Foreground
#000000black
#faf9fasnow
Card
#fcfcfcsnow
#070208black
Card foreground
#000000black
#fdfcfdwhite
Popover
#fcfcfcsnow
#070208black
Popover foreground
#000000black
#fdfcfdwhite
Primary
#f5e7f9lavenderblush
#f5e7f9lavenderblush
Primary foreground
#72248arebeccapurple
#72248arebeccapurple
Secondary
#ebf9e7honeydew
#ebf9e7honeydew
Secondary foreground
#18390fdarkgreen
#18390fdarkgreen
Muted
#d8e9d3gainsboro
#1b2c16black
Muted foreground
#51614cdarkolivegreen
#a3b39edarkgray
Accent
#ebf9e7honeydew
#ebf9e7honeydew
Accent foreground
#18390fdarkgreen
#18390fdarkgreen
Destructive
#5d0b09maroon
#d71a14firebrick
Destructive foreground
#f6a4a2lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f5e7f9lavenderblush
#f5e7f9lavenderblush

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button7.54:1AAA
Secondary button11.76:1AAA
Muted text5.22:1AA
Accent11.76:1AAA
Destructive7.05:1AAA
Dark mode
Text on background19.77:1AAA
Text on card20.07:1AAA
Primary button7.54:1AAA
Secondary button11.76:1AAA
Muted text6.66:1AA
Accent11.76:1AAA
Destructive5.19:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.915 0.035 138.372);
  --muted-foreground: oklch(0.473 0.038 138.428);
  --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.943 0.028 318.301);
  --primary-foreground: oklch(0.427 0.169 317.059);
  --secondary: oklch(0.966 0.028 138.361);
  --secondary-foreground: oklch(0.308 0.078 139.148);
  --accent: oklch(0.966 0.028 138.361);
  --accent-foreground: oklch(0.308 0.078 139.148);
  --destructive: oklch(0.31 0.114 28.344);
  --destructive-foreground: oklch(0.8 0.098 21.645);
  --ring: oklch(0.943 0.028 318.301);
  --chart-1: oklch(0.943 0.028 318.301);
  --chart-2: oklch(0.966 0.028 138.361);
  --chart-3: oklch(0.966 0.028 138.361);
  --chart-4: oklch(0.983 0.014 138.345);
  --chart-5: oklch(0.943 0.03 318.299);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.084 0.018 320.168);
  --foreground: oklch(0.984 0.002 318.328);
  --muted: oklch(0.273 0.046 138.638);
  --muted-foreground: oklch(0.747 0.034 138.381);
  --popover: oklch(0.106 0.023 320.168);
  --popover-foreground: oklch(0.992 0.001 318.329);
  --card: oklch(0.106 0.023 320.168);
  --card-foreground: oklch(0.992 0.001 318.329);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.943 0.028 318.301);
  --primary-foreground: oklch(0.427 0.169 317.059);
  --secondary: oklch(0.966 0.028 138.361);
  --secondary-foreground: oklch(0.308 0.078 139.148);
  --accent: oklch(0.966 0.028 138.361);
  --accent-foreground: oklch(0.308 0.078 139.148);
  --destructive: oklch(0.56 0.218 28.984);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.943 0.028 318.301);
  --chart-1: oklch(0.943 0.028 318.301);
  --chart-2: oklch(0.966 0.028 138.361);
  --chart-3: oklch(0.966 0.028 138.361);
  --chart-4: oklch(0.983 0.014 138.345);
  --chart-5: oklch(0.943 0.03 318.299);
}