Pun for shadcn/ui

Pun is a shadcn/ui theme built around a deep purple primary color (#341c3b) with deep green accents (#223b1c). The light mode uses a neutral background (#fdfbfd). Dark mode keeps the deep purple primary (#341c3b) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfbfdsnow
#000000black
Foreground
#070209black
#ffffffwhite
Card
#fbf8fcghostwhite
#030303black
Card foreground
#040104black
#ffffffwhite
Popover
#fbf8fcghostwhite
#030303black
Popover foreground
#040104black
#ffffffwhite
Primary
#341c3bdarkslategray
#341c3bdarkslategray
Primary foreground
#d1b0d9thistle
#d1b0d9thistle
Secondary
#223b1cdarkslategray
#223b1cdarkslategray
Secondary foreground
#b8d9b0silver
#b8d9b0silver
Muted
#e9f3e7beige
#0e180cblack
Muted foreground
#3c4739darkslategray
#bbc6b8silver
Accent
#223b1cdarkslategray
#223b1cdarkslategray
Accent foreground
#b8d9b0silver
#b8d9b0silver
Destructive
#9a2a0ebrown
#eb532dtomato
Destructive foreground
#fce4demistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#341c3bdarkslategray
#341c3bdarkslategray

Contrast

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

Light mode
Text on background20.02:1AAA
Text on card19.70:1AAA
Primary button7.92:1AAA
Secondary button7.98:1AAA
Muted text8.59:1AAA
Accent7.98:1AAA
Destructive6.36:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button7.92:1AAA
Secondary button7.98:1AAA
Muted text10.28:1AAA
Accent7.98:1AAA
Destructive3.60:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 319.445);
  --foreground: oklch(0.104 0.029 321.731);
  --muted: oklch(0.954 0.02 139.439);
  --muted-foreground: oklch(0.382 0.028 139.432);
  --popover: oklch(0.982 0.006 319.446);
  --popover-foreground: oklch(0.083 0.023 321.731);
  --card: oklch(0.982 0.006 319.446);
  --card-foreground: oklch(0.083 0.023 321.731);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.274 0.063 319.39);
  --primary-foreground: oklch(0.798 0.067 319.464);
  --secondary: oklch(0.322 0.06 139.534);
  --secondary-foreground: oklch(0.85 0.066 139.433);
  --accent: oklch(0.322 0.06 139.534);
  --accent-foreground: oklch(0.85 0.066 139.433);
  --destructive: oklch(0.458 0.152 34.353);
  --destructive-foreground: oklch(0.937 0.027 34.301);
  --ring: oklch(0.274 0.063 319.39);
  --chart-1: oklch(0.274 0.063 319.39);
  --chart-2: oklch(0.322 0.06 139.534);
  --chart-3: oklch(0.322 0.06 139.534);
  --chart-4: oklch(0.357 0.068 139.548);
  --chart-5: oklch(0.273 0.068 319.361);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.195 0.028 139.468);
  --muted-foreground: oklch(0.815 0.023 139.437);
  --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.274 0.063 319.39);
  --primary-foreground: oklch(0.798 0.067 319.464);
  --secondary: oklch(0.322 0.06 139.534);
  --secondary-foreground: oklch(0.85 0.066 139.433);
  --accent: oklch(0.322 0.06 139.534);
  --accent-foreground: oklch(0.85 0.066 139.433);
  --destructive: oklch(0.644 0.195 34.928);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.274 0.063 319.39);
  --chart-1: oklch(0.274 0.063 319.39);
  --chart-2: oklch(0.322 0.06 139.534);
  --chart-3: oklch(0.322 0.06 139.534);
  --chart-4: oklch(0.357 0.068 139.548);
  --chart-5: oklch(0.273 0.068 319.361);
}