Abacus for shadcn/ui

Abacus is a shadcn/ui theme built around a light purple primary color (#efbaf2) with muted light purple accents (#e2d9e2). The light mode uses a neutral background (#ffffff). Dark mode keeps the light purple primary (#efbaf2) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#ffffffwhite
#030203black
Foreground
#140515black
#ffffffwhite
Card
#ffffffwhite
#030203black
Card foreground
#140515black
#ffffffwhite
Popover
#ffffffwhite
#030203black
Popover foreground
#140515black
#ffffffwhite
Primary
#efbaf2thistle
#efbaf2thistle
Primary foreground
#621367indigo
#621367indigo
Secondary
#e2d9e2gainsboro
#201721black
Secondary foreground
#4d3b4edarkslategray
#c1a8c2silver
Muted
#f6eef6whitesmoke
#100911black
Muted foreground
#4d4c4ddarkslategray
#b3b2b3darkgray
Accent
#e2d9e2gainsboro
#201721black
Accent foreground
#4d3b4edarkslategray
#c1a8c2silver
Destructive
#a70901darkred
#fe0e01red
Destructive foreground
#ffdddbmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#efbaf2thistle
#efbaf2thistle

Contrast

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

Light mode
Text on background19.76:1AAA
Text on card19.76:1AAA
Primary button7.17:1AAA
Secondary button7.44:1AAA
Muted text7.53:1AAA
Accent7.44:1AAA
Destructive6.16:1AA
Dark mode
Text on background20.72:1AAA
Text on card20.72:1AAA
Primary button7.17:1AAA
Secondary button7.99:1AAA
Muted text9.29:1AAA
Accent7.99:1AAA
Destructive3.98:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.15 0.042 325.02);
  --muted: oklch(0.958 0.013 323.704);
  --muted-foreground: oklch(0.417 0.003 323.674);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.15 0.042 325.02);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.15 0.042 325.02);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.854 0.095 324.186);
  --primary-foreground: oklch(0.363 0.149 325.073);
  --secondary: oklch(0.896 0.016 323.726);
  --secondary-foreground: oklch(0.38 0.04 324.156);
  --accent: oklch(0.896 0.016 323.726);
  --accent-foreground: oklch(0.38 0.04 324.156);
  --destructive: oklch(0.461 0.185 29.834);
  --destructive-foreground: oklch(0.926 0.037 21.436);
  --ring: oklch(0.854 0.095 324.186);
  --chart-1: oklch(0.854 0.095 324.186);
  --chart-2: oklch(0.896 0.016 323.726);
  --chart-3: oklch(0.896 0.016 323.726);
  --chart-4: oklch(0.92 0.012 323.703);
  --chart-5: oklch(0.853 0.099 324.208);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.012 324.657);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.153 0.02 324.28);
  --muted-foreground: oklch(0.764 0.003 323.654);
  --popover: oklch(0.088 0.012 324.657);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.088 0.012 324.657);
  --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.854 0.095 324.186);
  --primary-foreground: oklch(0.363 0.149 325.073);
  --secondary: oklch(0.221 0.024 324.172);
  --secondary-foreground: oklch(0.761 0.047 323.946);
  --accent: oklch(0.221 0.024 324.172);
  --accent-foreground: oklch(0.761 0.047 323.946);
  --destructive: oklch(0.628 0.254 29.605);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.854 0.095 324.186);
  --chart-1: oklch(0.854 0.095 324.186);
  --chart-2: oklch(0.221 0.024 324.172);
  --chart-3: oklch(0.221 0.024 324.172);
  --chart-4: oklch(0.252 0.029 324.21);
  --chart-5: oklch(0.853 0.099 324.208);
}