Nippy for shadcn/ui

Nippy is a shadcn/ui theme built around a deep purple primary color (#79166a) with deep green accents (#167925). The light mode uses a neutral background (#fefbfd). Dark mode keeps the deep purple primary (#79166a) on a purple-tinted background (#10050e).

Color palette

TokenLightDark
Background
#fefbfdsnow
#10050eblack
Foreground
#090208black
#fcf8fbsnow
Card
#fcf7fcsnow
#130611black
Card foreground
#040104black
#fdfcfdwhite
Popover
#fcf7fcsnow
#130611black
Popover foreground
#040104black
#fdfcfdwhite
Primary
#79166apurple
#79166apurple
Primary foreground
#f6cbefmistyrose
#f6cbefmistyrose
Secondary
#167925forestgreen
#167925forestgreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dce9degainsboro
#162318black
Muted foreground
#57755bdimgray
#8aa88edarkseagreen
Accent
#167925forestgreen
#167925forestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#881d07darkred
#f44b2atomato
Destructive foreground
#fccec5pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#79166apurple
#79166apurple

Contrast

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

Light mode
Text on background19.97:1AAA
Text on card19.68:1AAA
Primary button6.89:1AA
Secondary button5.55:1AA
Muted text4.10:1AA Large
Accent5.55:1AA
Destructive6.66:1AA
Dark mode
Text on background19.03:1AAA
Text on card19.29:1AAA
Primary button6.89:1AA
Secondary button5.55:1AA
Muted text6.30:1AA
Accent5.55:1AA
Destructive3.56:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 330.297);
  --foreground: oklch(0.106 0.03 331.601);
  --muted: oklch(0.922 0.02 149.96);
  --muted-foreground: oklch(0.532 0.054 148.832);
  --popover: oklch(0.982 0.008 330.349);
  --popover-foreground: oklch(0.084 0.024 331.601);
  --card: oklch(0.982 0.008 330.349);
  --card-foreground: oklch(0.084 0.024 331.601);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.405 0.16 335.249);
  --primary-foreground: oklch(0.89 0.067 331.177);
  --secondary: oklch(0.503 0.148 144.845);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.503 0.148 144.845);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.41 0.145 32.709);
  --destructive-foreground: oklch(0.889 0.054 31.285);
  --ring: oklch(0.405 0.16 335.249);
  --chart-1: oklch(0.405 0.16 335.249);
  --chart-2: oklch(0.503 0.148 144.845);
  --chart-3: oklch(0.503 0.148 144.845);
  --chart-4: oklch(0.541 0.16 144.783);
  --chart-5: oklch(0.408 0.164 335.411);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.029 332.157);
  --foreground: oklch(0.983 0.006 330.321);
  --muted: oklch(0.238 0.028 148.604);
  --muted-foreground: oklch(0.702 0.051 149.263);
  --popover: oklch(0.151 0.033 332.591);
  --popover-foreground: oklch(0.992 0.003 330.283);
  --card: oklch(0.151 0.033 332.591);
  --card-foreground: oklch(0.992 0.003 330.283);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.405 0.16 335.249);
  --primary-foreground: oklch(0.89 0.067 331.177);
  --secondary: oklch(0.503 0.148 144.845);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.503 0.148 144.845);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.649 0.21 33.132);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.405 0.16 335.249);
  --chart-1: oklch(0.405 0.16 335.249);
  --chart-2: oklch(0.503 0.148 144.845);
  --chart-3: oklch(0.503 0.148 144.845);
  --chart-4: oklch(0.541 0.16 144.783);
  --chart-5: oklch(0.408 0.164 335.411);
}