Spiffy for shadcn/ui

Spiffy is a shadcn/ui theme built around a vivid indigo primary color (#5457f2) with vivid yellow accents (#f2f054). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the vivid indigo primary (#5457f2) on a neutral background (#030307).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#030307black
Foreground
#03030cblack
#fcfcfdwhite
Card
#fcfcfdwhite
#030307black
Card foreground
#03030cblack
#fcfcfdwhite
Popover
#fcfcfdwhite
#030307black
Popover foreground
#03030cblack
#fcfcfdwhite
Primary
#5457f2royalblue
#5457f2royalblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#f2f054khaki
#f2f054khaki
Secondary foreground
#131301black
#131301black
Muted
#e5e5e1gainsboro
#1e1e1ablack
Muted foreground
#696854dimgray
#abab96darkgray
Accent
#f2f054khaki
#f2f054khaki
Accent foreground
#131301black
#131301black
Destructive
#a0210dfirebrick
#ed4126orangered
Destructive foreground
#fde6e3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5457f2royalblue
#5457f2royalblue

Contrast

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

Light mode
Text on background19.98:1AAA
Text on card19.98:1AAA
Primary button5.22:1AA
Secondary button15.44:1AAA
Muted text4.46:1AA Large
Accent15.44:1AAA
Destructive6.46:1AA
Dark mode
Text on background20.10:1AAA
Text on card20.10:1AAA
Primary button5.22:1AA
Secondary button15.44:1AAA
Muted text7.18:1AAA
Accent15.44:1AAA
Destructive3.89:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 285.58);
  --foreground: oklch(0.107 0.026 279.887);
  --muted: oklch(0.92 0.004 105.703);
  --muted-foreground: oklch(0.513 0.031 106.64);
  --popover: oklch(0.991 0.002 285.58);
  --popover-foreground: oklch(0.107 0.026 279.887);
  --card: oklch(0.991 0.002 285.58);
  --card-foreground: oklch(0.107 0.026 279.887);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.551 0.227 275.298);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.928 0.171 108.367);
  --secondary-foreground: oklch(0.18 0.035 108.689);
  --accent: oklch(0.928 0.171 108.367);
  --accent-foreground: oklch(0.18 0.035 108.689);
  --destructive: oklch(0.461 0.166 31.559);
  --destructive-foreground: oklch(0.943 0.025 28.089);
  --ring: oklch(0.551 0.227 275.298);
  --chart-1: oklch(0.551 0.227 275.298);
  --chart-2: oklch(0.928 0.171 108.367);
  --chart-3: oklch(0.928 0.171 108.367);
  --chart-4: oklch(0.933 0.162 108.244);
  --chart-5: oklch(0.548 0.234 274.771);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.099 0.017 281.774);
  --foreground: oklch(0.991 0.002 285.585);
  --muted: oklch(0.232 0.006 106.083);
  --muted-foreground: oklch(0.735 0.029 106.289);
  --popover: oklch(0.099 0.017 281.774);
  --popover-foreground: oklch(0.991 0.002 285.585);
  --card: oklch(0.099 0.017 281.774);
  --card-foreground: oklch(0.991 0.002 285.585);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.551 0.227 275.298);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.928 0.171 108.367);
  --secondary-foreground: oklch(0.18 0.035 108.689);
  --accent: oklch(0.928 0.171 108.367);
  --accent-foreground: oklch(0.18 0.035 108.689);
  --destructive: oklch(0.628 0.213 31.661);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.551 0.227 275.298);
  --chart-1: oklch(0.551 0.227 275.298);
  --chart-2: oklch(0.928 0.171 108.367);
  --chart-3: oklch(0.928 0.171 108.367);
  --chart-4: oklch(0.933 0.162 108.244);
  --chart-5: oklch(0.548 0.234 274.771);
}