Able for shadcn/ui

Able is a shadcn/ui theme built around a deep purple primary color (#4f1556) with deep green accents (#1c5615). The light mode uses a neutral background (#fefbfe). Dark mode keeps the deep purple primary (#4f1556) on a neutral background (#040104).

Color palette

TokenLightDark
Background
#fefbfewhite
#040104black
Foreground
#000000black
#fbf9fbsnow
Card
#fdf7fdsnow
#070208black
Card foreground
#000000black
#fdfcfdwhite
Popover
#fefbfewhite
#040104black
Popover foreground
#000000black
#fbf9fbsnow
Primary
#4f1556indigo
#4f1556indigo
Primary foreground
#e6b1ecplum
#e6b1ecplum
Secondary
#1c5615darkgreen
#1c5615darkgreen
Secondary foreground
#b7ecb1palegreen
#b7ecb1palegreen
Muted
#dfeeddgainsboro
#132211black
Muted foreground
#545a53dimgray
#a6aca5darkgray
Accent
#1c5615darkgreen
#1c5615darkgreen
Accent foreground
#b7ecb1palegreen
#b7ecb1palegreen
Destructive
#d62c05firebrick
#fa5c38tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4f1556indigo
#4f1556indigo

Contrast

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

Light mode
Text on background20.40:1AAA
Text on card19.83:1AAA
Primary button7.51:1AAA
Secondary button6.57:1AA
Muted text5.87:1AA
Accent6.57:1AA
Destructive4.98:1AA
Dark mode
Text on background19.82:1AAA
Text on card20.06:1AAA
Primary button7.51:1AAA
Secondary button6.57:1AA
Muted text7.16:1AAA
Accent6.57:1AA
Destructive6.63:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 322.649);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.933 0.028 142.503);
  --muted-foreground: oklch(0.46 0.014 142.507);
  --popover: oklch(0.991 0.005 322.649);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.981 0.011 322.671);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.323 0.121 323.572);
  --primary-foreground: oklch(0.828 0.098 323.072);
  --secondary: oklch(0.4 0.113 141.681);
  --secondary-foreground: oklch(0.891 0.095 142.188);
  --accent: oklch(0.4 0.113 141.681);
  --accent-foreground: oklch(0.891 0.095 142.188);
  --destructive: oklch(0.568 0.209 32.578);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.323 0.121 323.572);
  --chart-1: oklch(0.323 0.121 323.572);
  --chart-2: oklch(0.4 0.113 141.681);
  --chart-3: oklch(0.4 0.113 141.681);
  --chart-4: oklch(0.438 0.125 141.684);
  --chart-5: oklch(0.324 0.125 323.558);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.02 324.408);
  --foreground: oklch(0.983 0.004 322.645);
  --muted: oklch(0.233 0.039 141.952);
  --muted-foreground: oklch(0.737 0.012 142.56);
  --popover: oklch(0.085 0.02 324.408);
  --popover-foreground: oklch(0.983 0.004 322.645);
  --card: oklch(0.107 0.025 324.408);
  --card-foreground: oklch(0.992 0.002 322.636);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.323 0.121 323.572);
  --primary-foreground: oklch(0.828 0.098 323.072);
  --secondary: oklch(0.4 0.113 141.681);
  --secondary-foreground: oklch(0.891 0.095 142.188);
  --accent: oklch(0.4 0.113 141.681);
  --accent-foreground: oklch(0.891 0.095 142.188);
  --destructive: oklch(0.678 0.2 34.116);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.323 0.121 323.572);
  --chart-1: oklch(0.323 0.121 323.572);
  --chart-2: oklch(0.4 0.113 141.681);
  --chart-3: oklch(0.4 0.113 141.681);
  --chart-4: oklch(0.438 0.125 141.684);
  --chart-5: oklch(0.324 0.125 323.558);
}