Prelude for shadcn/ui

Prelude is a shadcn/ui theme built around a blue primary color (#919ed4) with green accents (#9ed491). The light mode uses a neutral background (#f7f8fd). Dark mode keeps the blue primary (#919ed4) on a blue-tinted background (#04050b).

Color palette

TokenLightDark
Background
#f7f8fdghostwhite
#04050bblack
Foreground
#020308black
#f5f6fawhitesmoke
Card
#f7f8fdghostwhite
#04050bblack
Card foreground
#020308black
#f5f6fawhitesmoke
Popover
#f7f8fdghostwhite
#04050bblack
Popover foreground
#020308black
#f5f6fawhitesmoke
Primary
#919ed4mediumpurple
#919ed4mediumpurple
Primary foreground
#0e1325black
#0e1325black
Secondary
#d4919erosybrown
#d4919erosybrown
Secondary foreground
#250e13black
#250e13black
Muted
#f1eeefwhitesmoke
#110e0eblack
Muted foreground
#5d5b5bdimgray
#a4a2a3darkgray
Accent
#9ed491darkseagreen
#9ed491darkseagreen
Accent foreground
#13250eblack
#13250eblack
Destructive
#b71106firebrick
#f93d2ftomato
Destructive foreground
#fff1f0seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#919ed4mediumpurple
#919ed4mediumpurple

Contrast

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

Light mode
Text on background19.43:1AAA
Text on card19.43:1AAA
Primary button7.08:1AAA
Secondary button7.24:1AAA
Muted text5.85:1AA
Accent9.47:1AAA
Destructive6.15:1AA
Dark mode
Text on background18.81:1AAA
Text on card18.81:1AAA
Primary button7.08:1AAA
Secondary button7.24:1AAA
Muted text7.58:1AAA
Accent9.47:1AAA
Destructive3.67:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.007 274.952);
  --foreground: oklch(0.102 0.016 268.04);
  --muted: oklch(0.952 0.003 3.28);
  --muted-foreground: oklch(0.473 0.002 3.323);
  --popover: oklch(0.98 0.007 274.952);
  --popover-foreground: oklch(0.102 0.016 268.04);
  --card: oklch(0.98 0.007 274.952);
  --card-foreground: oklch(0.102 0.016 268.04);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.71 0.08 273.353);
  --primary-foreground: oklch(0.192 0.037 271.876);
  --secondary: oklch(0.726 0.083 6.208);
  --secondary-foreground: oklch(0.201 0.038 8.409);
  --accent: oklch(0.816 0.108 139.455);
  --accent-foreground: oklch(0.241 0.047 139.561);
  --destructive: oklch(0.495 0.195 29.818);
  --destructive-foreground: oklch(0.969 0.015 22.387);
  --ring: oklch(0.71 0.08 273.353);
  --chart-1: oklch(0.71 0.08 273.353);
  --chart-2: oklch(0.726 0.083 6.208);
  --chart-3: oklch(0.816 0.108 139.455);
  --chart-4: oklch(0.754 0.074 5.769);
  --chart-5: oklch(0.706 0.086 273.206);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.016 269.26);
  --foreground: oklch(0.973 0.006 274.961);
  --muted: oklch(0.167 0.005 4.033);
  --muted-foreground: oklch(0.715 0.002 3.267);
  --popover: oklch(0.119 0.016 269.26);
  --popover-foreground: oklch(0.973 0.006 274.961);
  --card: oklch(0.119 0.016 269.26);
  --card-foreground: oklch(0.973 0.006 274.961);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.71 0.08 273.353);
  --primary-foreground: oklch(0.192 0.037 271.876);
  --secondary: oklch(0.726 0.083 6.208);
  --secondary-foreground: oklch(0.201 0.038 8.409);
  --accent: oklch(0.816 0.108 139.455);
  --accent-foreground: oklch(0.241 0.047 139.561);
  --destructive: oklch(0.644 0.225 29.069);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.71 0.08 273.353);
  --chart-1: oklch(0.71 0.08 273.353);
  --chart-2: oklch(0.726 0.083 6.208);
  --chart-3: oklch(0.816 0.108 139.455);
  --chart-4: oklch(0.754 0.074 5.769);
  --chart-5: oklch(0.706 0.086 273.206);
}