Impure for shadcn/ui

Impure is a shadcn/ui theme built around a purple primary color (#b71ec2) with green accents (#29c21e). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the purple primary (#b71ec2) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfbfewhite
#000000black
Foreground
#0d020eblack
#ffffffwhite
Card
#fcf8fcsnow
#030303black
Card foreground
#090109black
#ffffffwhite
Popover
#fcf8fcsnow
#030303black
Popover foreground
#090109black
#ffffffwhite
Primary
#b71ec2darkorchid
#b71ec2darkorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#29c21elimegreen
#29c21elimegreen
Secondary foreground
#041203black
#041203black
Muted
#edf3edwhitesmoke
#0d120cblack
Muted foreground
#556954dimgray
#98ab96darkseagreen
Accent
#29c21elimegreen
#29c21elimegreen
Accent foreground
#041203black
#041203black
Destructive
#8a1d0fdarkred
#eb513dtomato
Destructive foreground
#fad6d1bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b71ec2darkorchid
#b71ec2darkorchid

Contrast

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

Light mode
Text on background19.82:1AAA
Text on card19.54:1AAA
Primary button5.26:1AA
Secondary button8.08:1AAA
Muted text5.26:1AA
Accent8.08:1AAA
Destructive6.87:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button5.26:1AA
Secondary button8.08:1AAA
Muted text7.74:1AAA
Accent8.08:1AAA
Destructive3.63:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 323.654);
  --foreground: oklch(0.12 0.042 325.775);
  --muted: oklch(0.957 0.01 143.583);
  --muted-foreground: oklch(0.498 0.04 143.202);
  --popover: oklch(0.983 0.007 323.674);
  --popover-foreground: oklch(0.104 0.036 326.041);
  --card: oklch(0.983 0.007 323.674);
  --card-foreground: oklch(0.104 0.036 326.041);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.564 0.246 325.016);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.71 0.228 142.144);
  --secondary-foreground: oklch(0.161 0.04 141.54);
  --accent: oklch(0.71 0.228 142.144);
  --accent-foreground: oklch(0.161 0.04 141.54);
  --destructive: oklch(0.416 0.147 31.038);
  --destructive-foreground: oklch(0.904 0.042 26.813);
  --ring: oklch(0.564 0.246 325.016);
  --chart-1: oklch(0.564 0.246 325.016);
  --chart-2: oklch(0.71 0.228 142.144);
  --chart-3: oklch(0.71 0.228 142.144);
  --chart-4: oklch(0.746 0.24 142.146);
  --chart-5: oklch(0.569 0.252 324.988);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.175 0.015 143.187);
  --muted-foreground: oklch(0.72 0.037 143.364);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.564 0.246 325.016);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.71 0.228 142.144);
  --secondary-foreground: oklch(0.161 0.04 141.54);
  --accent: oklch(0.71 0.228 142.144);
  --accent-foreground: oklch(0.161 0.04 141.54);
  --destructive: oklch(0.643 0.193 30.532);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.564 0.246 325.016);
  --chart-1: oklch(0.564 0.246 325.016);
  --chart-2: oklch(0.71 0.228 142.144);
  --chart-3: oklch(0.71 0.228 142.144);
  --chart-4: oklch(0.746 0.24 142.146);
  --chart-5: oklch(0.569 0.252 324.988);
}