Frail for shadcn/ui

Frail is a shadcn/ui theme built around a vivid deep green primary color (#1b8a05) with vivid deep purple accents (#74058a). The light mode uses a neutral background (#f9fcf8). Dark mode keeps the vivid deep green primary (#1b8a05) on a green-tinted background (#060a05).

Color palette

TokenLightDark
Background
#f9fcf8mintcream
#060a05black
Foreground
#000000black
#f5faf4whitesmoke
Card
#f5faf4whitesmoke
#080d07black
Card foreground
#000000black
#f9fcf8mintcream
Popover
#f9fcf8mintcream
#060a05black
Popover foreground
#000000black
#f5faf4whitesmoke
Primary
#1b8a05green
#1b8a05green
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#74058apurple
#74058apurple
Secondary foreground
#f3c4fdlavender
#f3c4fdlavender
Muted
#f5eef6whitesmoke
#0f0911black
Muted foreground
#67586adimgray
#a495a7darkgray
Accent
#74058apurple
#74058apurple
Accent foreground
#f3c4fdlavender
#f3c4fdlavender
Destructive
#812709saddlebrown
#db420forangered
Destructive foreground
#fbcfc1peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1b8a05green
#1b8a05green

Contrast

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

Light mode
Text on background20.27:1AAA
Text on card19.91:1AAA
Primary button4.49:1AA Large
Secondary button6.64:1AA
Muted text5.80:1AA
Accent6.64:1AA
Destructive6.65:1AA
Dark mode
Text on background18.85:1AAA
Text on card18.92:1AAA
Primary button4.49:1AA Large
Secondary button6.64:1AA
Muted text6.97:1AA
Accent6.64:1AA
Destructive4.36:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.006 140.522);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.957 0.013 320.552);
  --muted-foreground: oklch(0.481 0.033 320.633);
  --popover: oklch(0.987 0.006 140.522);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.981 0.009 140.517);
  --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.552 0.181 141.414);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.41 0.194 319.232);
  --secondary-foreground: oklch(0.879 0.092 320.681);
  --accent: oklch(0.41 0.194 319.232);
  --accent-foreground: oklch(0.879 0.092 320.681);
  --destructive: oklch(0.408 0.129 36.815);
  --destructive-foreground: oklch(0.889 0.053 39.264);
  --ring: oklch(0.552 0.181 141.414);
  --chart-1: oklch(0.552 0.181 141.414);
  --chart-2: oklch(0.41 0.194 319.232);
  --chart-3: oklch(0.41 0.194 319.232);
  --chart-4: oklch(0.441 0.209 319.158);
  --chart-5: oklch(0.557 0.184 141.465);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.014 139.567);
  --foreground: oklch(0.981 0.01 140.516);
  --muted: oklch(0.152 0.02 320.755);
  --muted-foreground: oklch(0.689 0.03 320.598);
  --popover: oklch(0.138 0.014 139.567);
  --popover-foreground: oklch(0.981 0.01 140.516);
  --card: oklch(0.152 0.016 139.798);
  --card-foreground: oklch(0.987 0.006 140.521);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.552 0.181 141.414);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.41 0.194 319.232);
  --secondary-foreground: oklch(0.879 0.092 320.681);
  --accent: oklch(0.41 0.194 319.232);
  --accent-foreground: oklch(0.879 0.092 320.681);
  --destructive: oklch(0.598 0.197 36.11);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.552 0.181 141.414);
  --chart-1: oklch(0.552 0.181 141.414);
  --chart-2: oklch(0.41 0.194 319.232);
  --chart-3: oklch(0.41 0.194 319.232);
  --chart-4: oklch(0.441 0.209 319.158);
  --chart-5: oklch(0.557 0.184 141.465);
}