Tragic for shadcn/ui

Tragic is a shadcn/ui theme built around a vivid blue primary color (#5196ec) with vivid green accents (#96ec51). The light mode uses a neutral background (#fbfcfd). Dark mode keeps the vivid blue primary (#5196ec) on a blue-tinted background (#05070a).

Color palette

TokenLightDark
Background
#fbfcfdwhite
#05070ablack
Foreground
#000000black
#f5f7fawhitesmoke
Card
#f8fafcghostwhite
#070a0eblack
Card foreground
#000000black
#f8fafcghostwhite
Popover
#fbfcfdwhite
#05070ablack
Popover foreground
#000000black
#f5f7fawhitesmoke
Primary
#5196eccornflowerblue
#5196eccornflowerblue
Primary foreground
#010509black
#010509black
Secondary
#ec5196palevioletred
#ec5196palevioletred
Secondary foreground
#090105black
#090105black
Muted
#eae6e8lavender
#191517black
Muted foreground
#5b4951dimgray
#b6a4addarkgray
Accent
#96ec51yellowgreen
#96ec51yellowgreen
Accent foreground
#050901black
#050901black
Destructive
#b04611sienna
#ea6d2echocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5196eccornflowerblue
#5196eccornflowerblue

Contrast

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

Light mode
Text on background20.51:1AAA
Text on card20.02:1AAA
Primary button6.75:1AA
Secondary button6.05:1AA
Muted text6.74:1AA
Accent13.74:1AAA
Destructive5.60:1AA
Dark mode
Text on background18.76:1AAA
Text on card18.97:1AAA
Primary button6.75:1AA
Secondary button6.05:1AA
Muted text7.68:1AAA
Accent13.74:1AAA
Destructive6.73:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.002 253.231);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.928 0.006 347.979);
  --muted-foreground: oklch(0.425 0.027 349.494);
  --popover: oklch(0.992 0.002 253.231);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.004 253.244);
  --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.668 0.146 254.668);
  --primary-foreground: oklch(0.108 0.018 241.276);
  --secondary: oklch(0.663 0.2 356.283);
  --secondary-foreground: oklch(0.101 0.031 347.335);
  --accent: oklch(0.857 0.204 133.724);
  --accent-foreground: oklch(0.13 0.028 128.649);
  --destructive: oklch(0.532 0.151 42.303);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.668 0.146 254.668);
  --chart-1: oklch(0.668 0.146 254.668);
  --chart-2: oklch(0.663 0.2 356.283);
  --chart-3: oklch(0.857 0.204 133.724);
  --chart-4: oklch(0.683 0.187 355.195);
  --chart-5: oklch(0.668 0.151 254.765);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.129 0.009 248.243);
  --foreground: oklch(0.975 0.005 253.254);
  --muted: oklch(0.201 0.008 348.923);
  --muted-foreground: oklch(0.738 0.024 348.669);
  --popover: oklch(0.129 0.009 248.243);
  --popover-foreground: oklch(0.975 0.005 253.254);
  --card: oklch(0.142 0.011 250.629);
  --card-foreground: oklch(0.984 0.003 253.242);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.668 0.146 254.668);
  --primary-foreground: oklch(0.108 0.018 241.276);
  --secondary: oklch(0.663 0.2 356.283);
  --secondary-foreground: oklch(0.101 0.031 347.335);
  --accent: oklch(0.857 0.204 133.724);
  --accent-foreground: oklch(0.13 0.028 128.649);
  --destructive: oklch(0.676 0.172 44.095);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.668 0.146 254.668);
  --chart-1: oklch(0.668 0.146 254.668);
  --chart-2: oklch(0.663 0.2 356.283);
  --chart-3: oklch(0.857 0.204 133.724);
  --chart-4: oklch(0.683 0.187 355.195);
  --chart-5: oklch(0.668 0.151 254.765);
}