Toaster for shadcn/ui

Toaster is a shadcn/ui theme built around a muted green primary color (#5f8672) with muted teal accents (#5f8686). The light mode uses a neutral background (#fbfefc). Dark mode keeps the muted green primary (#5f8672) on a neutral background (#030705).

Color palette

TokenLightDark
Background
#fbfefcwhite
#030705black
Foreground
#010905black
#ffffffwhite
Card
#fbfefcwhite
#030705black
Card foreground
#010905black
#ffffffwhite
Popover
#fbfefcwhite
#030705black
Popover foreground
#010905black
#ffffffwhite
Primary
#5f8672dimgray
#5f8672dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#60865fdimgray
#60865fdimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#edf7edhoneydew
#081208black
Muted foreground
#404540darkslategray
#babfbasilver
Accent
#5f8686slategray
#5f8686slategray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#d6360aorangered
#f4491aorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5f8672dimgray
#5f8672dimgray

Contrast

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

Light mode
Text on background19.85:1AAA
Text on card19.85:1AAA
Primary button4.07:1AA Large
Secondary button4.12:1AA Large
Muted text8.95:1AAA
Accent3.99:1AA Large
Destructive4.76:1AA
Dark mode
Text on background20.24:1AAA
Text on card20.24:1AAA
Primary button4.07:1AA Large
Secondary button4.12:1AA Large
Muted text10.23:1AAA
Accent3.99:1AA Large
Destructive3.60:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 164.179);
  --foreground: oklch(0.127 0.023 164.435);
  --muted: oklch(0.967 0.017 144.976);
  --muted-foreground: oklch(0.384 0.011 144.894);
  --popover: oklch(0.994 0.004 164.179);
  --popover-foreground: oklch(0.127 0.023 164.435);
  --card: oklch(0.994 0.004 164.179);
  --card-foreground: oklch(0.127 0.023 164.435);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.586 0.053 161.656);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.581 0.073 144.172);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.592 0.043 194.741);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.577 0.202 34.148);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.586 0.053 161.656);
  --chart-1: oklch(0.586 0.053 161.656);
  --chart-2: oklch(0.581 0.073 144.172);
  --chart-3: oklch(0.592 0.043 194.741);
  --chart-4: oklch(0.609 0.077 144.166);
  --chart-5: oklch(0.592 0.062 161.192);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.013 164.37);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.168 0.026 143.878);
  --muted-foreground: oklch(0.8 0.009 145.018);
  --popover: oklch(0.122 0.013 164.37);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.122 0.013 164.37);
  --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.586 0.053 161.656);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.581 0.073 144.172);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.592 0.043 194.741);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.647 0.214 34.978);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.586 0.053 161.656);
  --chart-1: oklch(0.586 0.053 161.656);
  --chart-2: oklch(0.581 0.073 144.172);
  --chart-3: oklch(0.592 0.043 194.741);
  --chart-4: oklch(0.609 0.077 144.166);
  --chart-5: oklch(0.592 0.062 161.192);
}