Generate feedback colors (success, warning, error, and info) for shadcn/ui

Go to generator

10000+Themes for shadcn/ui

Treatment for shadcn/ui

Treatment is a shadcn/ui theme built around a deep green primary color (#2b5b1a) with deep purple accents (#4b1a5b). The light mode uses a neutral background (#f8fdf7). Dark mode keeps the deep green primary (#2b5b1a) on a neutral background (#020302).

Color palette

TokenLightDark
Background
#f8fdf7mintcream
#020302black
Foreground
#030902black
#f9fcf8mintcream
Card
#f5fcf3honeydew
#040704black
Card foreground
#020401black
#fcfdfcwhite
Popover
#f8fdf7mintcream
#020302black
Popover foreground
#030902black
#f9fcf8mintcream
Primary
#2b5b1aforestgreen
#2b5b1aforestgreen
Primary foreground
#c8ebbclightgrey
#c8ebbclightgrey
Secondary
#4b1a5bindigo
#4b1a5bindigo
Secondary foreground
#e0bcebthistle
#e0bcebthistle
Muted
#dfcde5gainsboro
#2c1a32darkslategray
Muted foreground
#453649darkslategray
#c4b6c9silver
Accent
#4b1a5bindigo
#4b1a5bindigo
Accent foreground
#e0bcebthistle
#e0bcebthistle
Destructive
#5c1c0amaroon
#d03e16firebrick
Destructive foreground
#f5b5a3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2b5b1aforestgreen
#2b5b1aforestgreen

Contrast

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

Light mode
Text on background19.53:1AAA
Text on card19.69:1AAA
Primary button6.15:1AA
Secondary button7.85:1AAA
Muted text7.44:1AAA
Accent7.85:1AAA
Destructive7.39:1AAA
Dark mode
Text on background19.94:1AAA
Text on card19.88:1AAA
Primary button6.15:1AA
Secondary button7.85:1AAA
Muted text8.33:1AAA
Accent7.85:1AAA
Destructive4.79:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.009 137.779);
  --foreground: oklch(0.126 0.026 135.696);
  --muted: oklch(0.87 0.037 317.693);
  --muted-foreground: oklch(0.357 0.038 317.585);
  --popover: oklch(0.989 0.009 137.779);
  --popover-foreground: oklch(0.126 0.026 135.696);
  --card: oklch(0.983 0.014 137.787);
  --card-foreground: oklch(0.1 0.021 135.696);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.422 0.109 138.865);
  --primary-foreground: oklch(0.904 0.074 137.919);
  --secondary: oklch(0.325 0.117 316.564);
  --secondary-foreground: oklch(0.841 0.076 317.613);
  --accent: oklch(0.325 0.117 316.564);
  --accent-foreground: oklch(0.841 0.076 317.613);
  --destructive: oklch(0.326 0.099 35.763);
  --destructive-foreground: oklch(0.827 0.08 36.043);
  --ring: oklch(0.422 0.109 138.865);
  --chart-1: oklch(0.422 0.109 138.865);
  --chart-2: oklch(0.325 0.117 316.564);
  --chart-3: oklch(0.325 0.117 316.564);
  --chart-4: oklch(0.353 0.129 316.511);
  --chart-5: oklch(0.426 0.113 138.964);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.009 136.839);
  --foreground: oklch(0.987 0.005 137.772);
  --muted: oklch(0.254 0.05 317.377);
  --muted-foreground: oklch(0.793 0.031 317.699);
  --popover: oklch(0.096 0.009 136.839);
  --popover-foreground: oklch(0.987 0.005 137.772);
  --card: oklch(0.12 0.012 136.839);
  --card-foreground: oklch(0.993 0.002 137.767);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.422 0.109 138.865);
  --primary-foreground: oklch(0.904 0.074 137.919);
  --secondary: oklch(0.325 0.117 316.564);
  --secondary-foreground: oklch(0.841 0.076 317.613);
  --accent: oklch(0.325 0.117 316.564);
  --accent-foreground: oklch(0.841 0.076 317.613);
  --destructive: oklch(0.574 0.189 35.068);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.422 0.109 138.865);
  --chart-1: oklch(0.422 0.109 138.865);
  --chart-2: oklch(0.325 0.117 316.564);
  --chart-3: oklch(0.325 0.117 316.564);
  --chart-4: oklch(0.353 0.129 316.511);
  --chart-5: oklch(0.426 0.113 138.964);
}