Usable for shadcn/ui

Usable is a shadcn/ui theme built around a purple primary color (#d930d3) with green accents (#30d936). The light mode uses a neutral background (#fefbfe). Dark mode keeps the purple primary (#d930d3) on a purple-tinted background (#0f050f).

Color palette

TokenLightDark
Background
#fefbfewhite
#0f050fblack
Foreground
#000000black
#f9f5f9whitesmoke
Card
#fefbfewhite
#0f050fblack
Card foreground
#000000black
#f9f5f9whitesmoke
Popover
#fefbfewhite
#0f050fblack
Popover foreground
#000000black
#f9f5f9whitesmoke
Primary
#d930d3mediumorchid
#d930d3mediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#30d936limegreen
#30d936limegreen
Secondary foreground
#09340bdarkgreen
#09340bdarkgreen
Muted
#e3f3e3beige
#0c1c0dblack
Muted foreground
#495b49darkslategray
#a4b6a5darkgray
Accent
#30d936limegreen
#30d936limegreen
Accent foreground
#09340bdarkgreen
#09340bdarkgreen
Destructive
#66200bmaroon
#e85021chocolate
Destructive foreground
#f6bdaclightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d930d3mediumorchid
#d930d3mediumorchid

Contrast

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

Light mode
Text on background20.44:1AAA
Text on card20.44:1AAA
Primary button3.94:1AA Large
Secondary button7.36:1AAA
Muted text6.30:1AA
Accent7.36:1AAA
Destructive7.23:1AAA
Dark mode
Text on background18.53:1AAA
Text on card18.53:1AAA
Primary button3.94:1AA Large
Secondary button7.36:1AAA
Muted text8.23:1AAA
Accent7.36:1AAA
Destructive3.76:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 326.581);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.947 0.026 146.295);
  --muted-foreground: oklch(0.449 0.036 145.82);
  --popover: oklch(0.991 0.005 326.581);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.991 0.005 326.581);
  --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.635 0.259 329.633);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.773 0.24 143.145);
  --secondary-foreground: oklch(0.285 0.081 143.511);
  --accent: oklch(0.773 0.24 143.145);
  --accent-foreground: oklch(0.285 0.081 143.511);
  --destructive: oklch(0.349 0.105 36.629);
  --destructive-foreground: oklch(0.846 0.07 37.599);
  --ring: oklch(0.635 0.259 329.633);
  --chart-1: oklch(0.635 0.259 329.633);
  --chart-2: oklch(0.773 0.24 143.145);
  --chart-3: oklch(0.773 0.24 143.145);
  --chart-4: oklch(0.783 0.232 143.354);
  --chart-5: oklch(0.64 0.266 329.697);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.029 328.092);
  --foreground: oklch(0.975 0.007 326.599);
  --muted: oklch(0.209 0.037 144.826);
  --muted-foreground: oklch(0.759 0.031 146.172);
  --popover: oklch(0.139 0.029 328.092);
  --popover-foreground: oklch(0.975 0.007 326.599);
  --card: oklch(0.139 0.029 328.092);
  --card-foreground: oklch(0.975 0.007 326.599);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.635 0.259 329.633);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.773 0.24 143.145);
  --secondary-foreground: oklch(0.285 0.081 143.511);
  --accent: oklch(0.773 0.24 143.145);
  --accent-foreground: oklch(0.285 0.081 143.511);
  --destructive: oklch(0.634 0.196 36.377);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.635 0.259 329.633);
  --chart-1: oklch(0.635 0.259 329.633);
  --chart-2: oklch(0.773 0.24 143.145);
  --chart-3: oklch(0.773 0.24 143.145);
  --chart-4: oklch(0.783 0.232 143.354);
  --chart-5: oklch(0.64 0.266 329.697);
}