Dual for shadcn/ui

Dual is a shadcn/ui theme built around a green primary color (#8de2ab) with teal accents (#8de2d5). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#8de2ab) on a neutral background (#040705).

Color palette

TokenLightDark
Background
#ffffffwhite
#040705black
Foreground
#06130bblack
#f9fafaghostwhite
Card
#ffffffwhite
#040705black
Card foreground
#06130bblack
#f9fafaghostwhite
Popover
#ffffffwhite
#040705black
Popover foreground
#06130bblack
#f9fafaghostwhite
Primary
#8de2ablightgreen
#8de2ablightgreen
Primary foreground
#0d3119black
#0d3119black
Secondary
#9ae28dlightgreen
#9ae28dlightgreen
Secondary foreground
#12310dblack
#12310dblack
Muted
#e3f0e0beige
#111f0fblack
Muted foreground
#454b44darkslategray
#b5bbb4silver
Accent
#8de2d5skyblue
#8de2d5skyblue
Accent foreground
#0d312bdarkslategray
#0d312bdarkslategray
Destructive
#7e0e0cmaroon
#ee4744tomato
Destructive foreground
#f9c3c2pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8de2ablightgreen
#8de2ablightgreen

Contrast

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

Light mode
Text on background18.99:1AAA
Text on card18.99:1AAA
Primary button9.23:1AAA
Secondary button9.25:1AAA
Muted text7.58:1AAA
Accent9.35:1AAA
Destructive6.97:1AA
Dark mode
Text on background19.39:1AAA
Text on card19.39:1AAA
Primary button9.23:1AAA
Secondary button9.25:1AAA
Muted text8.75:1AAA
Accent9.35:1AAA
Destructive3.74:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.172 0.026 155.076);
  --muted: oklch(0.94 0.025 141.007);
  --muted-foreground: oklch(0.405 0.014 140.989);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.172 0.026 155.076);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.172 0.026 155.076);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.844 0.113 154.721);
  --primary-foreground: oklch(0.279 0.06 151.912);
  --secondary: oklch(0.844 0.134 140.759);
  --secondary-foreground: oklch(0.279 0.071 140.787);
  --accent: oklch(0.855 0.084 183.771);
  --accent-foreground: oklch(0.284 0.042 181.548);
  --destructive: oklch(0.38 0.145 28.287);
  --destructive-foreground: oklch(0.866 0.062 19.555);
  --ring: oklch(0.844 0.113 154.721);
  --chart-1: oklch(0.844 0.113 154.721);
  --chart-2: oklch(0.844 0.134 140.759);
  --chart-3: oklch(0.855 0.084 183.771);
  --chart-4: oklch(0.86 0.121 140.785);
  --chart-5: oklch(0.847 0.118 154.556);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.01 157.821);
  --foreground: oklch(0.985 0.002 157.953);
  --muted: oklch(0.221 0.035 140.761);
  --muted-foreground: oklch(0.786 0.012 141.032);
  --popover: oklch(0.12 0.01 157.821);
  --popover-foreground: oklch(0.985 0.002 157.953);
  --card: oklch(0.12 0.01 157.821);
  --card-foreground: oklch(0.985 0.002 157.953);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.844 0.113 154.721);
  --primary-foreground: oklch(0.279 0.06 151.912);
  --secondary: oklch(0.844 0.134 140.759);
  --secondary-foreground: oklch(0.279 0.071 140.787);
  --accent: oklch(0.855 0.084 183.771);
  --accent-foreground: oklch(0.284 0.042 181.548);
  --destructive: oklch(0.638 0.204 25.882);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.844 0.113 154.721);
  --chart-1: oklch(0.844 0.113 154.721);
  --chart-2: oklch(0.844 0.134 140.759);
  --chart-3: oklch(0.855 0.084 183.771);
  --chart-4: oklch(0.86 0.121 140.785);
  --chart-5: oklch(0.847 0.118 154.556);
}