Cord for shadcn/ui

Cord is a shadcn/ui theme built around a deep green primary color (#23612f) with deep purple accents (#612356). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#23612f) on a neutral background (#010402).

Color palette

TokenLightDark
Background
#ffffffwhite
#010402black
Foreground
#010903black
#f6f8f7whitesmoke
Card
#fcfcfcsnow
#030704black
Card foreground
#010501black
#f9fbfamintcream
Popover
#ffffffwhite
#010402black
Popover foreground
#010903black
#f6f8f7whitesmoke
Primary
#23612fdarkslategray
#23612fdarkslategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#612356indigo
#612356indigo
Secondary foreground
#eccbe6gainsboro
#eccbe6gainsboro
Muted
#ddd5dbgainsboro
#2a2229darkslategray
Muted foreground
#4a4549darkslategray
#bab5b9silver
Accent
#612356indigo
#612356indigo
Accent foreground
#eccbe6gainsboro
#eccbe6gainsboro
Destructive
#950904darkred
#fa3a33tomato
Destructive foreground
#fecfcdpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#23612fdarkslategray
#23612fdarkslategray

Contrast

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

Light mode
Text on background20.15:1AAA
Text on card20.07:1AAA
Primary button7.39:1AAA
Secondary button7.54:1AAA
Muted text6.50:1AA
Accent7.54:1AAA
Destructive6.47:1AA
Dark mode
Text on background19.32:1AAA
Text on card19.47:1AAA
Primary button7.39:1AAA
Secondary button7.54:1AAA
Muted text7.63:1AAA
Accent7.54:1AAA
Destructive3.68:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.125 0.028 150.12);
  --muted: oklch(0.88 0.013 331.616);
  --muted-foreground: oklch(0.396 0.011 331.79);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.125 0.028 150.12);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.099 0.022 150.12);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.441 0.103 147.117);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.369 0.112 335.406);
  --secondary-foreground: oklch(0.877 0.052 332.225);
  --accent: oklch(0.369 0.112 335.406);
  --accent-foreground: oklch(0.877 0.052 332.225);
  --destructive: oklch(0.425 0.169 29.417);
  --destructive-foreground: oklch(0.894 0.053 20.51);
  --ring: oklch(0.441 0.103 147.117);
  --chart-1: oklch(0.441 0.103 147.117);
  --chart-2: oklch(0.369 0.112 335.406);
  --chart-3: oklch(0.369 0.112 335.406);
  --chart-4: oklch(0.397 0.122 335.469);
  --chart-5: oklch(0.445 0.108 146.879);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.014 150.626);
  --foreground: oklch(0.978 0.003 151.367);
  --muted: oklch(0.265 0.018 332.32);
  --muted-foreground: oklch(0.778 0.009 331.573);
  --popover: oklch(0.096 0.014 150.626);
  --popover-foreground: oklch(0.978 0.003 151.367);
  --card: oklch(0.121 0.017 150.626);
  --card-foreground: oklch(0.985 0.002 151.38);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.441 0.103 147.117);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.369 0.112 335.406);
  --secondary-foreground: oklch(0.877 0.052 332.225);
  --accent: oklch(0.369 0.112 335.406);
  --accent-foreground: oklch(0.877 0.052 332.225);
  --destructive: oklch(0.645 0.228 27.827);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.441 0.103 147.117);
  --chart-1: oklch(0.441 0.103 147.117);
  --chart-2: oklch(0.369 0.112 335.406);
  --chart-3: oklch(0.369 0.112 335.406);
  --chart-4: oklch(0.397 0.122 335.469);
  --chart-5: oklch(0.445 0.108 146.879);
}