Mild for shadcn/ui

Mild is a shadcn/ui theme built around a green primary color (#26c047) with red accents (#c04726). The light mode uses a neutral background (#f7fdf8). Dark mode keeps the green primary (#26c047) on a neutral background (#020302).

Color palette

TokenLightDark
Background
#f7fdf8mintcream
#020302black
Foreground
#020903black
#ffffffwhite
Card
#f3fcf5mintcream
#030704black
Card foreground
#010402black
#ffffffwhite
Popover
#f7fdf8mintcream
#020302black
Popover foreground
#020903black
#ffffffwhite
Primary
#26c047limegreen
#26c047limegreen
Primary foreground
#041508black
#041508black
Secondary
#4726c0rebeccapurple
#4726c0rebeccapurple
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dad7e5gainsboro
#1d1a28black
Muted foreground
#5b576bdimgray
#9994a8darkgray
Accent
#c04726sienna
#c04726sienna
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#b81800firebrick
#ff3d1forangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#26c047limegreen
#26c047limegreen

Contrast

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

Light mode
Text on background19.50:1AAA
Text on card19.63:1AAA
Primary button7.77:1AAA
Secondary button9.11:1AAA
Muted text4.89:1AA
Accent5.04:1AA
Destructive6.63:1AA
Dark mode
Text on background20.62:1AAA
Text on card20.27:1AAA
Primary button7.77:1AAA
Secondary button9.11:1AAA
Muted text5.81:1AA
Accent5.04:1AA
Destructive3.54:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.009 152.481);
  --foreground: oklch(0.124 0.024 151.656);
  --muted: oklch(0.885 0.02 295.916);
  --muted-foreground: oklch(0.469 0.031 295.094);
  --popover: oklch(0.988 0.009 152.481);
  --popover-foreground: oklch(0.124 0.024 151.656);
  --card: oklch(0.982 0.013 152.411);
  --card-foreground: oklch(0.098 0.019 151.656);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.706 0.203 145.975);
  --primary-foreground: oklch(0.177 0.037 149.942);
  --secondary: oklch(0.427 0.218 281.878);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.559 0.162 35.988);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.499 0.193 31.234);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.706 0.203 145.975);
  --chart-1: oklch(0.706 0.203 145.975);
  --chart-2: oklch(0.427 0.218 281.878);
  --chart-3: oklch(0.559 0.162 35.988);
  --chart-4: oklch(0.447 0.23 281.731);
  --chart-5: oklch(0.715 0.209 145.752);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.01 152.115);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.228 0.028 293.985);
  --muted-foreground: oklch(0.678 0.029 295.557);
  --popover: oklch(0.095 0.01 152.115);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.12 0.013 152.115);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.706 0.203 145.975);
  --primary-foreground: oklch(0.177 0.037 149.942);
  --secondary: oklch(0.427 0.218 281.878);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.559 0.162 35.988);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.654 0.233 31.599);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.706 0.203 145.975);
  --chart-1: oklch(0.706 0.203 145.975);
  --chart-2: oklch(0.427 0.218 281.878);
  --chart-3: oklch(0.559 0.162 35.988);
  --chart-4: oklch(0.447 0.23 281.731);
  --chart-5: oklch(0.715 0.209 145.752);
}