Poppy for shadcn/ui

Poppy is a shadcn/ui theme built around an indigo primary color (#8269d3) with neutral gray accents (#d3d2d5). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the indigo primary (#8269d3) on an indigo-tinted background (#070410).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#070410black
Foreground
#070410black
#f9f9fbghostwhite
Card
#fcfcfdwhite
#070410black
Card foreground
#070410black
#f9f9fbghostwhite
Popover
#fcfcfdwhite
#070410black
Popover foreground
#070410black
#f9f9fbghostwhite
Primary
#8269d3mediumpurple
#8269d3mediumpurple
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d3d2d5lightgrey
#18161dblack
Secondary foreground
#39383ddarkslategray
#ada9bcdarkgray
Muted
#dad7e5gainsboro
#1d1a28black
Muted foreground
#43404fdarkslategray
#b3b0bfsilver
Accent
#d3d2d5lightgrey
#18161dblack
Accent foreground
#39383ddarkslategray
#ada9bcdarkgray
Destructive
#e60b00red
#fa0c00red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8269d3mediumpurple
#8269d3mediumpurple

Contrast

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

Light mode
Text on background19.76:1AAA
Text on card19.76:1AAA
Primary button4.28:1AA Large
Secondary button7.71:1AAA
Muted text7.10:1AAA
Accent7.71:1AAA
Destructive4.77:1AA
Dark mode
Text on background19.28:1AAA
Text on card19.28:1AAA
Primary button4.28:1AA Large
Secondary button7.83:1AAA
Muted text8.00:1AAA
Accent7.83:1AAA
Destructive4.10:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 297.04);
  --foreground: oklch(0.123 0.03 295.217);
  --muted: oklch(0.886 0.019 296.688);
  --muted-foreground: oklch(0.38 0.027 295.788);
  --popover: oklch(0.991 0.002 297.04);
  --popover-foreground: oklch(0.123 0.03 295.217);
  --card: oklch(0.991 0.002 297.04);
  --card-foreground: oklch(0.123 0.03 295.217);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.594 0.158 291.609);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.865 0.005 296.979);
  --secondary-foreground: oklch(0.345 0.008 296.651);
  --accent: oklch(0.865 0.005 296.979);
  --accent-foreground: oklch(0.345 0.008 296.651);
  --destructive: oklch(0.582 0.236 29.68);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.594 0.158 291.609);
  --chart-1: oklch(0.594 0.158 291.609);
  --chart-2: oklch(0.865 0.005 296.979);
  --chart-3: oklch(0.865 0.005 296.979);
  --chart-4: oklch(0.889 0.004 297);
  --chart-5: oklch(0.589 0.166 291.202);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.029 295.302);
  --foreground: oklch(0.983 0.002 297.034);
  --muted: oklch(0.229 0.027 294.889);
  --muted-foreground: oklch(0.764 0.023 296.548);
  --popover: oklch(0.124 0.029 295.302);
  --popover-foreground: oklch(0.983 0.002 297.034);
  --card: oklch(0.124 0.029 295.302);
  --card-foreground: oklch(0.983 0.002 297.034);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.594 0.158 291.609);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.206 0.013 295.911);
  --secondary-foreground: oklch(0.744 0.029 296.381);
  --accent: oklch(0.206 0.013 295.911);
  --accent-foreground: oklch(0.744 0.029 296.381);
  --destructive: oklch(0.621 0.252 29.638);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.594 0.158 291.609);
  --chart-1: oklch(0.594 0.158 291.609);
  --chart-2: oklch(0.206 0.013 295.911);
  --chart-3: oklch(0.206 0.013 295.911);
  --chart-4: oklch(0.236 0.017 295.797);
  --chart-5: oklch(0.589 0.166 291.202);
}