Puritan for shadcn/ui

Puritan is a shadcn/ui theme built around a muted light teal primary color (#bdd6c9) with muted light pink accents (#d6bdc9). The light mode uses a neutral background (#f7fdfa). Dark mode keeps the muted light teal primary (#bdd6c9) on a teal-tinted background (#04100a).

Color palette

TokenLightDark
Background
#f7fdfamintcream
#04100ablack
Foreground
#010403black
#f5faf7whitesmoke
Card
#f7fdfamintcream
#04100ablack
Card foreground
#010403black
#f5faf7whitesmoke
Popover
#f7fdfamintcream
#04100ablack
Popover foreground
#010403black
#f5faf7whitesmoke
Primary
#bdd6c9silver
#bdd6c9silver
Primary foreground
#253c30darkslategray
#253c30darkslategray
Secondary
#d6bdc9thistle
#d6bdc9thistle
Secondary foreground
#3c2530darkslategray
#3c2530darkslategray
Muted
#ecdfe6gainsboro
#20131ablack
Muted foreground
#403f40darkslategray
#c0bfbfsilver
Accent
#d6bdc9thistle
#d6bdc9thistle
Accent foreground
#3c2530darkslategray
#3c2530darkslategray
Destructive
#7a1d06maroon
#f44a1forangered
Destructive foreground
#fcc4b6lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#bdd6c9silver
#bdd6c9silver

Contrast

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

Light mode
Text on background19.99:1AAA
Text on card19.99:1AAA
Primary button7.72:1AAA
Secondary button7.97:1AAA
Muted text8.12:1AAA
Accent7.97:1AAA
Destructive6.84:1AA
Dark mode
Text on background18.32:1AAA
Text on card18.32:1AAA
Primary button7.72:1AAA
Secondary button7.97:1AAA
Muted text9.78:1AAA
Accent7.97:1AAA
Destructive3.58:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.008 164.928);
  --foreground: oklch(0.098 0.013 165.288);
  --muted: oklch(0.916 0.016 345.601);
  --muted-foreground: oklch(0.37 0.002 345.287);
  --popover: oklch(0.989 0.008 164.928);
  --popover-foreground: oklch(0.098 0.013 165.288);
  --card: oklch(0.989 0.008 164.928);
  --card-foreground: oklch(0.098 0.013 165.288);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.854 0.033 164.1);
  --primary-foreground: oklch(0.333 0.036 161.883);
  --secondary: oklch(0.823 0.034 346.185);
  --secondary-foreground: oklch(0.297 0.04 348.393);
  --accent: oklch(0.823 0.034 346.185);
  --accent-foreground: oklch(0.297 0.04 348.393);
  --destructive: oklch(0.384 0.131 34.211);
  --destructive-foreground: oklch(0.866 0.067 34.423);
  --ring: oklch(0.854 0.033 164.1);
  --chart-1: oklch(0.854 0.033 164.1);
  --chart-2: oklch(0.823 0.034 346.185);
  --chart-3: oklch(0.823 0.034 346.185);
  --chart-4: oklch(0.848 0.029 346.006);
  --chart-5: oklch(0.857 0.037 163.969);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.16 0.024 162.943);
  --foreground: oklch(0.98 0.006 164.97);
  --muted: oklch(0.207 0.024 347.959);
  --muted-foreground: oklch(0.805 0.002 345.198);
  --popover: oklch(0.16 0.024 162.943);
  --popover-foreground: oklch(0.98 0.006 164.97);
  --card: oklch(0.16 0.024 162.943);
  --card-foreground: oklch(0.98 0.006 164.97);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.854 0.033 164.1);
  --primary-foreground: oklch(0.333 0.036 161.883);
  --secondary: oklch(0.823 0.034 346.185);
  --secondary-foreground: oklch(0.297 0.04 348.393);
  --accent: oklch(0.823 0.034 346.185);
  --accent-foreground: oklch(0.297 0.04 348.393);
  --destructive: oklch(0.648 0.214 34.413);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.854 0.033 164.1);
  --chart-1: oklch(0.854 0.033 164.1);
  --chart-2: oklch(0.823 0.034 346.185);
  --chart-3: oklch(0.823 0.034 346.185);
  --chart-4: oklch(0.848 0.029 346.006);
  --chart-5: oklch(0.857 0.037 163.969);
}