Abacus for shadcn/ui

Abacus is a shadcn/ui theme built around a near-black primary color (#020806) with muted light teal accents (#e3e8e6). The light mode uses a neutral background (#fbfefd). Dark mode keeps the near-black primary (#020806) on a neutral background (#030706).

Color palette

TokenLightDark
Background
#fbfefdwhite
#030706black
Foreground
#041510black
#f6f9f8whitesmoke
Card
#fbfefdwhite
#030706black
Card foreground
#041510black
#f6f9f8whitesmoke
Popover
#fbfefdwhite
#030706black
Popover foreground
#041510black
#f6f9f8whitesmoke
Primary
#020806black
#020806black
Primary foreground
#30a685mediumseagreen
#30a685mediumseagreen
Secondary
#e3e8e6gainsboro
#242424darkslategray
Secondary foreground
#46534fdarkslategray
#bdbdbdsilver
Muted
#f0f5f3whitesmoke
#0f0a0ablack
Muted foreground
#4d605bdimgray
#b29f9fdarkgray
Accent
#e3e8e6gainsboro
#242424darkslategray
Accent foreground
#46534fdarkslategray
#bdbdbdsilver
Destructive
#691a07maroon
#e1390eorangered
Destructive foreground
#f9b9a9lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#020806black
#020806black

Contrast

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

Light mode
Text on background18.46:1AAA
Text on card18.46:1AAA
Primary button6.65:1AA
Secondary button6.48:1AA
Muted text6.05:1AA
Accent6.48:1AA
Destructive7.11:1AAA
Dark mode
Text on background19.12:1AAA
Text on card19.12:1AAA
Primary button6.65:1AA
Secondary button8.29:1AAA
Muted text7.80:1AAA
Accent8.29:1AAA
Destructive4.37:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 177.626);
  --foreground: oklch(0.179 0.026 173.518);
  --muted: oklch(0.965 0.005 177.559);
  --muted-foreground: oklch(0.472 0.025 176.097);
  --popover: oklch(0.994 0.003 177.626);
  --popover-foreground: oklch(0.179 0.026 173.518);
  --card: oklch(0.994 0.003 177.626);
  --card-foreground: oklch(0.179 0.026 173.518);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.124 0.014 177.856);
  --primary-foreground: oklch(0.652 0.115 169.751);
  --secondary: oklch(0.926 0.005 177.569);
  --secondary-foreground: oklch(0.429 0.016 176.555);
  --accent: oklch(0.926 0.005 177.569);
  --accent-foreground: oklch(0.429 0.016 176.555);
  --destructive: oklch(0.349 0.115 34.521);
  --destructive-foreground: oklch(0.841 0.079 34.494);
  --ring: oklch(0.124 0.014 177.856);
  --chart-1: oklch(0.124 0.014 177.856);
  --chart-2: oklch(0.926 0.005 177.569);
  --chart-3: oklch(0.926 0.005 177.569);
  --chart-4: oklch(0.948 0.003 177.615);
  --chart-5: oklch(0.125 0.015 177.862);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.121 0.009 177.806);
  --foreground: oklch(0.979 0.003 177.623);
  --muted: oklch(0.153 0.008 18.067);
  --muted-foreground: oklch(0.718 0.022 17.686);
  --popover: oklch(0.121 0.009 177.806);
  --popover-foreground: oklch(0.979 0.003 177.623);
  --card: oklch(0.121 0.009 177.806);
  --card-foreground: oklch(0.979 0.003 177.623);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.124 0.014 177.856);
  --primary-foreground: oklch(0.652 0.115 169.751);
  --secondary: oklch(0.259 0 167.471);
  --secondary-foreground: oklch(0.797 0 180);
  --accent: oklch(0.259 0 167.471);
  --accent-foreground: oklch(0.797 0 180);
  --destructive: oklch(0.599 0.21 33.68);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.124 0.014 177.856);
  --chart-1: oklch(0.124 0.014 177.856);
  --chart-2: oklch(0.259 0 167.471);
  --chart-3: oklch(0.259 0 167.471);
  --chart-4: oklch(0.29 0 180);
  --chart-5: oklch(0.125 0.015 177.862);
}