Puny for shadcn/ui

Puny is a shadcn/ui theme built around a muted deep red primary color (#3e3234) with muted deep teal accents (#323e3c). The light mode uses a neutral background (#fefbfc). Dark mode keeps the muted deep red primary (#3e3234) on a red-tinted background (#0c0304).

Color palette

TokenLightDark
Background
#fefbfcsnow
#0c0304black
Foreground
#160406black
#ffffffwhite
Card
#fefbfcsnow
#0c0304black
Card foreground
#160406black
#ffffffwhite
Popover
#fefbfcsnow
#0c0304black
Popover foreground
#160406black
#ffffffwhite
Primary
#3e3234darkslategray
#3e3234darkslategray
Primary foreground
#d6cccelightgrey
#d6cccelightgrey
Secondary
#323e3cdarkslategray
#323e3cdarkslategray
Secondary foreground
#ccd6d5lightgrey
#ccd6d5lightgrey
Muted
#f0f5f4whitesmoke
#0a0f0fblack
Muted foreground
#384c49darkslategray
#b3c7c4silver
Accent
#323e3cdarkslategray
#323e3cdarkslategray
Accent foreground
#ccd6d5lightgrey
#ccd6d5lightgrey
Destructive
#b43308firebrick
#f56332tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3e3234darkslategray
#3e3234darkslategray

Contrast

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

Light mode
Text on background19.38:1AAA
Text on card19.38:1AAA
Primary button7.82:1AAA
Secondary button7.46:1AAA
Muted text8.28:1AAA
Accent7.46:1AAA
Destructive6.12:1AA
Dark mode
Text on background20.36:1AAA
Text on card20.36:1AAA
Primary button7.82:1AAA
Secondary button7.46:1AAA
Muted text10.89:1AAA
Accent7.46:1AAA
Destructive6.73:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 6.66);
  --foreground: oklch(0.143 0.037 10.399);
  --muted: oklch(0.966 0.006 186.443);
  --muted-foreground: oklch(0.4 0.025 184.893);
  --popover: oklch(0.991 0.003 6.66);
  --popover-foreground: oklch(0.143 0.037 10.399);
  --card: oklch(0.991 0.003 6.66);
  --card-foreground: oklch(0.143 0.037 10.399);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.331 0.018 7.954);
  --primary-foreground: oklch(0.854 0.011 6.931);
  --secondary: oklch(0.353 0.017 185.365);
  --secondary-foreground: oklch(0.868 0.011 186.268);
  --accent: oklch(0.353 0.017 185.365);
  --accent-foreground: oklch(0.868 0.011 186.268);
  --destructive: oklch(0.515 0.172 35.911);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.331 0.018 7.954);
  --chart-1: oklch(0.331 0.018 7.954);
  --chart-2: oklch(0.353 0.017 185.365);
  --chart-3: oklch(0.353 0.017 185.365);
  --chart-4: oklch(0.384 0.018 185.336);
  --chart-5: oklch(0.329 0.023 8.351);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.023 7.64);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.164 0.009 185.201);
  --muted-foreground: oklch(0.813 0.022 185.896);
  --popover: oklch(0.119 0.023 7.64);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.119 0.023 7.64);
  --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.331 0.018 7.954);
  --primary-foreground: oklch(0.854 0.011 6.931);
  --secondary: oklch(0.353 0.017 185.365);
  --secondary-foreground: oklch(0.868 0.011 186.268);
  --accent: oklch(0.353 0.017 185.365);
  --accent-foreground: oklch(0.868 0.011 186.268);
  --destructive: oklch(0.68 0.19 38.053);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.331 0.018 7.954);
  --chart-1: oklch(0.331 0.018 7.954);
  --chart-2: oklch(0.353 0.017 185.365);
  --chart-3: oklch(0.353 0.017 185.365);
  --chart-4: oklch(0.384 0.018 185.336);
  --chart-5: oklch(0.329 0.023 8.351);
}