Nifty for shadcn/ui

Nifty is a shadcn/ui theme built around a vivid light pink primary color (#fde3f1) with vivid light red accents (#fde3e4). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light pink primary (#fde3f1) on a pink-tinted background (#0a0508).

Color palette

TokenLightDark
Background
#ffffffwhite
#0a0508black
Foreground
#000000black
#f8f6f7whitesmoke
Card
#ffffffwhite
#0a0508black
Card foreground
#000000black
#f8f6f7whitesmoke
Popover
#ffffffwhite
#0a0508black
Popover foreground
#000000black
#f8f6f7whitesmoke
Primary
#fde3f1lavenderblush
#fde3f1lavenderblush
Primary foreground
#a10c5epurple
#a10c5epurple
Secondary
#fce3fdlavenderblush
#fce3fdlavenderblush
Secondary foreground
#3f0542midnightblue
#3f0542midnightblue
Muted
#edd8eelavender
#261127black
Muted foreground
#504e50darkslategray
#b1afb1darkgray
Accent
#fde3e4mistyrose
#fde3e4mistyrose
Accent foreground
#a10c14firebrick
#a10c14firebrick
Destructive
#9d260bfirebrick
#ef411aorangered
Destructive foreground
#fde3demistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fde3f1lavenderblush
#fde3f1lavenderblush

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button6.36:1AA
Secondary button13.32:1AAA
Muted text6.15:1AA
Accent6.68:1AA
Destructive6.33:1AA
Dark mode
Text on background18.80:1AAA
Text on card18.80:1AAA
Primary button6.36:1AA
Secondary button13.32:1AAA
Muted text8.08:1AAA
Accent6.68:1AA
Destructive3.85:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.906 0.036 324.357);
  --muted-foreground: oklch(0.427 0.003 324.174);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.94 0.034 343.491);
  --primary-foreground: oklch(0.467 0.185 355.56);
  --secondary: oklch(0.942 0.044 324.396);
  --secondary-foreground: oklch(0.266 0.115 325.882);
  --accent: oklch(0.936 0.029 14.228);
  --accent-foreground: oklch(0.451 0.177 26.958);
  --destructive: oklch(0.46 0.16 33.359);
  --destructive-foreground: oklch(0.936 0.029 32.697);
  --ring: oklch(0.94 0.034 343.491);
  --chart-1: oklch(0.94 0.034 343.491);
  --chart-2: oklch(0.942 0.044 324.396);
  --chart-3: oklch(0.936 0.029 14.228);
  --chart-4: oklch(0.971 0.022 324.259);
  --chart-5: oklch(0.939 0.036 343.522);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.015 342.614);
  --foreground: oklch(0.976 0.002 342.678);
  --muted: oklch(0.219 0.05 325.287);
  --muted-foreground: oklch(0.756 0.003 324.151);
  --popover: oklch(0.126 0.015 342.614);
  --popover-foreground: oklch(0.976 0.002 342.678);
  --card: oklch(0.126 0.015 342.614);
  --card-foreground: oklch(0.976 0.002 342.678);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.94 0.034 343.491);
  --primary-foreground: oklch(0.467 0.185 355.56);
  --secondary: oklch(0.942 0.044 324.396);
  --secondary-foreground: oklch(0.266 0.115 325.882);
  --accent: oklch(0.936 0.029 14.228);
  --accent-foreground: oklch(0.451 0.177 26.958);
  --destructive: oklch(0.631 0.216 33.497);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.94 0.034 343.491);
  --chart-1: oklch(0.94 0.034 343.491);
  --chart-2: oklch(0.942 0.044 324.396);
  --chart-3: oklch(0.936 0.029 14.228);
  --chart-4: oklch(0.971 0.022 324.259);
  --chart-5: oklch(0.939 0.036 343.522);
}