Dual for shadcn/ui

Dual is a shadcn/ui theme built around a vivid green primary color (#09b932) with vivid teal accents (#09b98a). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid green primary (#09b932) on a green-tinted background (#060e08).

Color palette

TokenLightDark
Background
#ffffffwhite
#060e08black
Foreground
#020803black
#f5faf6whitesmoke
Card
#fcfcfcsnow
#08110ablack
Card foreground
#010402black
#f8fbf9mintcream
Popover
#ffffffwhite
#060e08black
Popover foreground
#020803black
#f5faf6whitesmoke
Primary
#09b932limegreen
#09b932limegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#38b909limegreen
#38b909limegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dee5dcgainsboro
#1c231ablack
Muted foreground
#485643darkslategray
#aebca9darkgray
Accent
#09b98alightseagreen
#09b98alightseagreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#5c0a0amaroon
#ea4343tomato
Destructive foreground
#f5a3a3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#09b932limegreen
#09b932limegreen

Contrast

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

Light mode
Text on background20.21:1AAA
Text on card20.15:1AAA
Primary button2.62:1Fail
Secondary button2.58:1Fail
Muted text6.09:1AA
Accent2.52:1Fail
Destructive7.09:1AAA
Dark mode
Text on background18.50:1AAA
Text on card18.35:1AAA
Primary button2.62:1Fail
Secondary button2.58:1Fail
Muted text8.05:1AAA
Accent2.52:1Fail
Destructive3.90: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.123 0.021 152.462);
  --muted: oklch(0.915 0.015 137.228);
  --muted-foreground: oklch(0.436 0.037 137.408);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.123 0.021 152.462);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.098 0.017 152.462);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.684 0.214 144.779);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.688 0.22 140.271);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.698 0.143 166.554);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.306 0.113 27.207);
  --destructive-foreground: oklch(0.796 0.097 19.443);
  --ring: oklch(0.684 0.214 144.779);
  --chart-1: oklch(0.684 0.214 144.779);
  --chart-2: oklch(0.688 0.22 140.271);
  --chart-3: oklch(0.698 0.143 166.554);
  --chart-4: oklch(0.728 0.234 140.311);
  --chart-5: oklch(0.691 0.219 144.614);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.153 0.018 152.195);
  --foreground: oklch(0.98 0.007 153.129);
  --muted: oklch(0.248 0.021 137.408);
  --muted-foreground: oklch(0.78 0.032 137.288);
  --popover: oklch(0.153 0.018 152.195);
  --popover-foreground: oklch(0.98 0.007 153.129);
  --card: oklch(0.167 0.021 151.301);
  --card-foreground: oklch(0.986 0.004 153.167);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.684 0.214 144.779);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.688 0.22 140.271);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.698 0.143 166.554);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.627 0.204 25.298);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.684 0.214 144.779);
  --chart-1: oklch(0.684 0.214 144.779);
  --chart-2: oklch(0.688 0.22 140.271);
  --chart-3: oklch(0.698 0.143 166.554);
  --chart-4: oklch(0.728 0.234 140.311);
  --chart-5: oklch(0.691 0.219 144.614);
}