Piercing for shadcn/ui

Piercing is a shadcn/ui theme built around a muted deep indigo primary color (#2f3041) with muted deep green accents (#30412f). The light mode uses a neutral background (#f7f7fd). Dark mode keeps the muted deep indigo primary (#2f3041) on an indigo-tinted background (#05050a).

Color palette

TokenLightDark
Background
#f7f7fdghostwhite
#05050ablack
Foreground
#03030dblack
#fcfcfdwhite
Card
#f3f3fcaliceblue
#07070eblack
Card foreground
#020209black
#ffffffwhite
Popover
#f7f7fdghostwhite
#05050ablack
Popover foreground
#03030dblack
#fcfcfdwhite
Primary
#2f3041darkslategray
#2f3041darkslategray
Primary foreground
#cacbd8lightgrey
#cacbd8lightgrey
Secondary
#412f30darkslategray
#412f30darkslategray
Secondary foreground
#d8cacblightgrey
#d8cacblightgrey
Muted
#f1e4e5mistyrose
#1b0e0fblack
Muted foreground
#534647darkslategray
#b9acaddarkgray
Accent
#30412fdarkslategray
#30412fdarkslategray
Accent foreground
#cbd8calightgrey
#cbd8calightgrey
Destructive
#bb0d07firebrick
#ec1009red
Destructive foreground
#fff5f5lavenderblush
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2f3041darkslategray
#2f3041darkslategray

Contrast

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

Light mode
Text on background19.27:1AAA
Text on card18.79:1AAA
Primary button8.02:1AAA
Secondary button7.88:1AAA
Muted text7.28:1AAA
Accent7.37:1AAA
Destructive6.18:1AA
Dark mode
Text on background19.81:1AAA
Text on card20.09:1AAA
Primary button8.02:1AAA
Secondary button7.88:1AAA
Muted text8.56:1AAA
Accent7.37:1AAA
Destructive4.51:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.978 0.007 282.976);
  --foreground: oklch(0.106 0.028 275.525);
  --muted: oklch(0.93 0.013 12.728);
  --muted-foreground: oklch(0.408 0.017 13.289);
  --popover: oklch(0.978 0.007 282.976);
  --popover-foreground: oklch(0.106 0.028 275.525);
  --card: oklch(0.967 0.011 282.908);
  --card-foreground: oklch(0.093 0.024 275.53);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.317 0.03 281.353);
  --primary-foreground: oklch(0.845 0.019 282.718);
  --secondary: oklch(0.327 0.026 14.161);
  --secondary-foreground: oklch(0.851 0.016 12.832);
  --accent: oklch(0.355 0.037 143.064);
  --accent-foreground: oklch(0.869 0.025 143.484);
  --destructive: oklch(0.501 0.2 29.285);
  --destructive-foreground: oklch(0.979 0.01 19.747);
  --ring: oklch(0.317 0.03 281.353);
  --chart-1: oklch(0.317 0.03 281.353);
  --chart-2: oklch(0.327 0.026 14.161);
  --chart-3: oklch(0.355 0.037 143.064);
  --chart-4: oklch(0.355 0.029 14.21);
  --chart-5: oklch(0.312 0.036 280.947);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.014 280.092);
  --foreground: oklch(0.99 0.002 283.069);
  --muted: oklch(0.183 0.021 14.959);
  --muted-foreground: oklch(0.756 0.014 12.818);
  --popover: oklch(0.12 0.014 280.092);
  --popover-foreground: oklch(0.99 0.002 283.069);
  --card: oklch(0.132 0.016 280.171);
  --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.317 0.03 281.353);
  --primary-foreground: oklch(0.845 0.019 282.718);
  --secondary: oklch(0.327 0.026 14.161);
  --secondary-foreground: oklch(0.851 0.016 12.832);
  --accent: oklch(0.355 0.037 143.064);
  --accent-foreground: oklch(0.869 0.025 143.484);
  --destructive: oklch(0.596 0.24 29.301);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.317 0.03 281.353);
  --chart-1: oklch(0.317 0.03 281.353);
  --chart-2: oklch(0.327 0.026 14.161);
  --chart-3: oklch(0.355 0.037 143.064);
  --chart-4: oklch(0.355 0.029 14.21);
  --chart-5: oklch(0.312 0.036 280.947);
}