Spiffy for shadcn/ui

Spiffy is a shadcn/ui theme built around a deep yellow primary color (#171807) with deep green accents (#0e1807). The light mode uses a neutral background (#fcfcf8). Dark mode keeps the deep yellow primary (#171807) on a yellow-tinted background (#0f0f05).

Color palette

TokenLightDark
Background
#fcfcf8snow
#0f0f05black
Foreground
#000000black
#fdfdfcwhite
Card
#fcfcf8snow
#0f0f05black
Card foreground
#000000black
#fdfdfcwhite
Popover
#fcfcf8snow
#0f0f05black
Popover foreground
#000000black
#fdfdfcwhite
Primary
#171807black
#171807black
Primary foreground
#b0b734yellowgreen
#b0b734yellowgreen
Secondary
#181007black
#181007black
Secondary foreground
#d9ad78burlywood
#d9ad78burlywood
Muted
#e3dacfgainsboro
#30271cdarkslategray
Muted foreground
#5e5750dimgray
#afa9a1darkgray
Accent
#0e1807black
#0e1807black
Accent foreground
#6fb734olivedrab
#6fb734olivedrab
Destructive
#d11800firebrick
#ff2205red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#171807black
#171807black

Contrast

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

Light mode
Text on background20.42:1AAA
Text on card20.42:1AAA
Primary button8.27:1AAA
Secondary button9.13:1AAA
Muted text5.12:1AA
Accent7.37:1AAA
Destructive5.45:1AA
Dark mode
Text on background18.92:1AAA
Text on card18.92:1AAA
Primary button8.27:1AAA
Secondary button9.13:1AAA
Muted text6.27:1AA
Accent7.37:1AAA
Destructive3.82: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.99 0.006 108.82);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.892 0.018 73.062);
  --muted-foreground: oklch(0.462 0.015 72.954);
  --popover: oklch(0.99 0.006 108.82);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.99 0.006 108.82);
  --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.202 0.031 111.354);
  --primary-foreground: oklch(0.751 0.149 112.337);
  --secondary: oklch(0.181 0.022 72.324);
  --secondary-foreground: oklch(0.776 0.086 71.59);
  --accent: oklch(0.194 0.035 132.181);
  --accent-foreground: oklch(0.706 0.178 134.122);
  --destructive: oklch(0.548 0.215 30.716);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.202 0.031 111.354);
  --chart-1: oklch(0.202 0.031 111.354);
  --chart-2: oklch(0.181 0.022 72.324);
  --chart-3: oklch(0.194 0.035 132.181);
  --chart-4: oklch(0.221 0.031 70.664);
  --chart-5: oklch(0.204 0.032 111.446);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.164 0.02 110.68);
  --foreground: oklch(0.994 0.002 108.746);
  --muted: oklch(0.28 0.023 72.245);
  --muted-foreground: oklch(0.738 0.013 73.082);
  --popover: oklch(0.164 0.02 110.68);
  --popover-foreground: oklch(0.994 0.002 108.746);
  --card: oklch(0.164 0.02 110.68);
  --card-foreground: oklch(0.994 0.002 108.746);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.202 0.031 111.354);
  --primary-foreground: oklch(0.751 0.149 112.337);
  --secondary: oklch(0.181 0.022 72.324);
  --secondary-foreground: oklch(0.776 0.086 71.59);
  --accent: oklch(0.194 0.035 132.181);
  --accent-foreground: oklch(0.706 0.178 134.122);
  --destructive: oklch(0.637 0.249 30.591);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.202 0.031 111.354);
  --chart-1: oklch(0.202 0.031 111.354);
  --chart-2: oklch(0.181 0.022 72.324);
  --chart-3: oklch(0.194 0.035 132.181);
  --chart-4: oklch(0.221 0.031 70.664);
  --chart-5: oklch(0.204 0.032 111.446);
}