Frustration for shadcn/ui

Frustration is a shadcn/ui theme built around a vivid purple primary color (#c321e8) with near-white accents (#ebeaeb). The light mode uses a neutral background (#fdfbfd). Dark mode keeps the vivid purple primary (#c321e8) on a purple-tinted background (#0a030c).

Color palette

TokenLightDark
Background
#fdfbfdsnow
#0a030cblack
Foreground
#000000black
#fdfcfdwhite
Card
#fdfbfdsnow
#0a030cblack
Card foreground
#000000black
#fdfcfdwhite
Popover
#fdfbfdsnow
#0a030cblack
Popover foreground
#000000black
#fdfcfdwhite
Primary
#c321e8darkorchid
#c321e8darkorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#ebeaeblavender
#342537darkslategray
Secondary foreground
#525152darkslategray
#cebcd2thistle
Muted
#e1cbe7gainsboro
#2f1834darkslategray
Muted foreground
#48394cdarkslategray
#c3b3c6silver
Accent
#ebeaeblavender
#342537darkslategray
Accent foreground
#525152darkslategray
#cebcd2thistle
Destructive
#66190amaroon
#df3716orangered
Destructive foreground
#f7b8ablightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c321e8darkorchid
#c321e8darkorchid

Contrast

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

Light mode
Text on background20.45:1AAA
Text on card20.45:1AAA
Primary button4.45:1AA Large
Secondary button6.59:1AA
Muted text7.07:1AAA
Accent6.59:1AA
Destructive7.23:1AAA
Dark mode
Text on background19.85:1AAA
Text on card19.85:1AAA
Primary button4.45:1AA Large
Secondary button8.04:1AAA
Muted text8.11:1AAA
Accent8.04:1AAA
Destructive4.47:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 319.994);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.869 0.045 320.037);
  --muted-foreground: oklch(0.368 0.037 320.074);
  --popover: oklch(0.991 0.003 319.994);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.991 0.003 319.994);
  --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.608 0.276 318.805);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.939 0.001 319.992);
  --secondary-foreground: oklch(0.436 0.003 319.998);
  --accent: oklch(0.939 0.001 319.992);
  --accent-foreground: oklch(0.436 0.003 319.998);
  --destructive: oklch(0.342 0.112 33.099);
  --destructive-foreground: oklch(0.837 0.075 31.496);
  --ring: oklch(0.608 0.276 318.805);
  --chart-1: oklch(0.608 0.276 318.805);
  --chart-2: oklch(0.939 0.001 319.992);
  --chart-3: oklch(0.939 0.001 319.992);
  --chart-4: oklch(0.962 0 319.992);
  --chart-5: oklch(0.612 0.282 318.668);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.028 321.558);
  --foreground: oklch(0.991 0.003 319.994);
  --muted: oklch(0.255 0.058 320.08);
  --muted-foreground: oklch(0.786 0.031 320.027);
  --popover: oklch(0.122 0.028 321.558);
  --popover-foreground: oklch(0.991 0.003 319.994);
  --card: oklch(0.122 0.028 321.558);
  --card-foreground: oklch(0.991 0.003 319.994);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.608 0.276 318.805);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.289 0.039 320.091);
  --secondary-foreground: oklch(0.816 0.037 320.032);
  --accent: oklch(0.289 0.039 320.091);
  --accent-foreground: oklch(0.816 0.037 320.032);
  --destructive: oklch(0.594 0.208 32.756);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.608 0.276 318.805);
  --chart-1: oklch(0.608 0.276 318.805);
  --chart-2: oklch(0.289 0.039 320.091);
  --chart-3: oklch(0.289 0.039 320.091);
  --chart-4: oklch(0.318 0.044 320.092);
  --chart-5: oklch(0.612 0.282 318.668);
}