Exchange for shadcn/ui

Exchange is a shadcn/ui theme built around a near-black primary color (#191a19) with muted green accents (#aec0aa). The light mode uses a neutral background (#fcfefb). Dark mode keeps the near-black primary (#191a19) on a green-tinted background (#070f06).

Color palette

TokenLightDark
Background
#fcfefbwhite
#070f06black
Foreground
#050c04black
#ffffffwhite
Card
#fcfefbwhite
#070f06black
Card foreground
#050c04black
#ffffffwhite
Popover
#fcfefbwhite
#070f06black
Popover foreground
#050c04black
#ffffffwhite
Primary
#191a19black
#191a19black
Primary foreground
#b1b5b0darkgray
#b1b5b0darkgray
Secondary
#cad0c8lightgrey
#233121darkslategray
Secondary foreground
#31372fdarkslategray
#baceb6silver
Muted
#e9f4e7honeydew
#0d180bblack
Muted foreground
#4f554edarkslategray
#abb1aadarkgray
Accent
#aec0aadarkgray
#2b4526darkslategray
Accent foreground
#192018black
#c5ddc0lightgrey
Destructive
#782402maroon
#fb6023tomato
Destructive foreground
#fdc5afpeachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#191a19black
#191a19black

Contrast

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

Light mode
Text on background19.47:1AAA
Text on card19.47:1AAA
Primary button8.38:1AAA
Secondary button7.75:1AAA
Muted text6.75:1AA
Accent8.66:1AAA
Destructive6.72:1AA
Dark mode
Text on background19.46:1AAA
Text on card19.46:1AAA
Primary button8.38:1AAA
Secondary button8.21:1AAA
Muted text8.29:1AAA
Accent7.29:1AAA
Destructive6.78:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 140.526);
  --foreground: oklch(0.141 0.025 138.91);
  --muted: oklch(0.955 0.021 140.497);
  --muted-foreground: oklch(0.442 0.013 140.488);
  --popover: oklch(0.994 0.004 140.526);
  --popover-foreground: oklch(0.141 0.025 138.91);
  --card: oklch(0.994 0.004 140.526);
  --card-foreground: oklch(0.141 0.025 138.91);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.217 0.004 140.506);
  --primary-foreground: oklch(0.768 0.008 140.516);
  --secondary: oklch(0.85 0.012 140.51);
  --secondary-foreground: oklch(0.327 0.015 140.462);
  --accent: oklch(0.788 0.037 140.46);
  --accent-foreground: oklch(0.235 0.019 140.412);
  --destructive: oklch(0.388 0.124 38.328);
  --destructive-foreground: oklch(0.869 0.071 42.597);
  --ring: oklch(0.217 0.004 140.506);
  --chart-1: oklch(0.217 0.004 140.506);
  --chart-2: oklch(0.85 0.012 140.51);
  --chart-3: oklch(0.788 0.037 140.46);
  --chart-4: oklch(0.873 0.01 140.514);
  --chart-5: oklch(0.218 0.007 140.482);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.156 0.024 139.45);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.196 0.03 140.342);
  --muted-foreground: oklch(0.753 0.011 140.509);
  --popover: oklch(0.156 0.024 139.45);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.156 0.024 139.45);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.217 0.004 140.506);
  --primary-foreground: oklch(0.768 0.008 140.516);
  --secondary: oklch(0.295 0.034 140.371);
  --secondary-foreground: oklch(0.829 0.04 140.457);
  --accent: oklch(0.361 0.061 140.339);
  --accent-foreground: oklch(0.871 0.046 140.452);
  --destructive: oklch(0.683 0.201 39.295);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.217 0.004 140.506);
  --chart-1: oklch(0.217 0.004 140.506);
  --chart-2: oklch(0.295 0.034 140.371);
  --chart-3: oklch(0.361 0.061 140.339);
  --chart-4: oklch(0.329 0.04 140.366);
  --chart-5: oklch(0.218 0.007 140.482);
}