Bonding for shadcn/ui

Bonding is a shadcn/ui theme built around a green primary color (#a1dc74) with green accents (#74dc7b). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#a1dc74) on a neutral background (#050802).

Color palette

TokenLightDark
Background
#ffffffwhite
#050802black
Foreground
#0c1505black
#f7faf4whitesmoke
Card
#fcfcfcsnow
#070c04black
Card foreground
#091104black
#fafcf8snow
Popover
#ffffffwhite
#050802black
Popover foreground
#0c1505black
#f7faf4whitesmoke
Primary
#a1dc74lightgreen
#a1dc74lightgreen
Primary foreground
#0e1806black
#0e1806black
Secondary
#d5dc74khaki
#d5dc74khaki
Secondary foreground
#171806black
#171806black
Muted
#f0f0ealinen
#14150fblack
Muted foreground
#606151dimgray
#adae9edarkgray
Accent
#74dc7blightgreen
#74dc7blightgreen
Accent foreground
#061807black
#061807black
Destructive
#cb240bfirebrick
#f33c20orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a1dc74lightgreen
#a1dc74lightgreen

Contrast

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

Light mode
Text on background18.66:1AAA
Text on card18.79:1AAA
Primary button11.32:1AAA
Secondary button12.28:1AAA
Muted text5.52:1AA
Accent10.77:1AAA
Destructive5.50:1AA
Dark mode
Text on background19.14:1AAA
Text on card19.15:1AAA
Primary button11.32:1AAA
Secondary button12.28:1AAA
Muted text8.15:1AAA
Accent10.77:1AAA
Destructive3.82:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.18 0.034 132.072);
  --muted: oklch(0.954 0.008 109.636);
  --muted-foreground: oklch(0.488 0.025 110.41);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.18 0.034 132.072);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.163 0.03 130.941);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.832 0.148 133.006);
  --primary-foreground: oklch(0.195 0.038 132.756);
  --secondary: oklch(0.868 0.128 112.156);
  --secondary-foreground: oklch(0.204 0.033 112.305);
  --accent: oklch(0.81 0.165 145.211);
  --accent-foreground: oklch(0.19 0.042 145.254);
  --destructive: oklch(0.544 0.204 31.317);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.832 0.148 133.006);
  --chart-1: oklch(0.832 0.148 133.006);
  --chart-2: oklch(0.868 0.128 112.156);
  --chart-3: oklch(0.81 0.165 145.211);
  --chart-4: oklch(0.879 0.119 111.915);
  --chart-5: oklch(0.837 0.155 133.107);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.019 129.797);
  --foreground: oklch(0.982 0.009 131.163);
  --muted: oklch(0.192 0.012 110.594);
  --muted-foreground: oklch(0.745 0.023 110.036);
  --popover: oklch(0.126 0.019 129.797);
  --popover-foreground: oklch(0.982 0.009 131.163);
  --card: oklch(0.144 0.022 129.944);
  --card-foreground: oklch(0.988 0.006 131.137);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.832 0.148 133.006);
  --primary-foreground: oklch(0.195 0.038 132.756);
  --secondary: oklch(0.868 0.128 112.156);
  --secondary-foreground: oklch(0.204 0.033 112.305);
  --accent: oklch(0.81 0.165 145.211);
  --accent-foreground: oklch(0.19 0.042 145.254);
  --destructive: oklch(0.634 0.222 31.634);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.832 0.148 133.006);
  --chart-1: oklch(0.832 0.148 133.006);
  --chart-2: oklch(0.868 0.128 112.156);
  --chart-3: oklch(0.81 0.165 145.211);
  --chart-4: oklch(0.879 0.119 111.915);
  --chart-5: oklch(0.837 0.155 133.107);
}