Impure for shadcn/ui

Impure is a shadcn/ui theme built around a muted blue primary color (#5d6d83) with muted green accents (#6d835d). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the muted blue primary (#5d6d83) on a blue-tinted background (#04070b).

Color palette

TokenLightDark
Background
#fbfcfewhite
#04070bblack
Foreground
#050b15black
#f6f7f8whitesmoke
Card
#fbfcfewhite
#04070bblack
Card foreground
#050b15black
#f6f7f8whitesmoke
Popover
#fbfcfewhite
#04070bblack
Popover foreground
#050b15black
#f6f7f8whitesmoke
Primary
#5d6d83dimgray
#5d6d83dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#835d6ddimgray
#835d6ddimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e2d5dagainsboro
#2a1d23black
Muted foreground
#6a535cdimgray
#ac959fdarkgray
Accent
#6d835ddimgray
#6d835ddimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#b60c0cfirebrick
#f33f3ftomato
Destructive foreground
#fef5f5lavenderblush
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5d6d83dimgray
#5d6d83dimgray

Contrast

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

Light mode
Text on background19.22:1AAA
Text on card19.22:1AAA
Primary button5.27:1AA
Secondary button5.58:1AA
Muted text4.89:1AA
Accent4.14:1AA Large
Destructive6.42:1AA
Dark mode
Text on background18.80:1AAA
Text on card18.80:1AAA
Primary button5.27:1AA
Secondary button5.58:1AA
Muted text5.81:1AA
Accent4.14:1AA Large
Destructive3.75: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.003 256.664);
  --foreground: oklch(0.149 0.024 253.559);
  --muted: oklch(0.884 0.017 350.195);
  --muted-foreground: oklch(0.469 0.033 351.564);
  --popover: oklch(0.991 0.003 256.664);
  --popover-foreground: oklch(0.149 0.024 253.559);
  --card: oklch(0.991 0.003 256.664);
  --card-foreground: oklch(0.149 0.024 253.559);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.53 0.04 256.821);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.524 0.055 352.422);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.583 0.062 132.667);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.492 0.196 28.638);
  --destructive-foreground: oklch(0.978 0.01 17.321);
  --ring: oklch(0.53 0.04 256.821);
  --chart-1: oklch(0.53 0.04 256.821);
  --chart-2: oklch(0.524 0.055 352.422);
  --chart-3: oklch(0.583 0.062 132.667);
  --chart-4: oklch(0.549 0.058 352.441);
  --chart-5: oklch(0.528 0.047 256.833);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.011 250.635);
  --foreground: oklch(0.976 0.002 256.659);
  --muted: oklch(0.249 0.023 352.15);
  --muted-foreground: oklch(0.694 0.03 350.842);
  --popover: oklch(0.127 0.011 250.635);
  --popover-foreground: oklch(0.976 0.002 256.659);
  --card: oklch(0.127 0.011 250.635);
  --card-foreground: oklch(0.976 0.002 256.659);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.53 0.04 256.821);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.524 0.055 352.422);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.583 0.062 132.667);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.638 0.216 25.809);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.53 0.04 256.821);
  --chart-1: oklch(0.53 0.04 256.821);
  --chart-2: oklch(0.524 0.055 352.422);
  --chart-3: oklch(0.583 0.062 132.667);
  --chart-4: oklch(0.549 0.058 352.441);
  --chart-5: oklch(0.528 0.047 256.833);
}