Shallows for shadcn/ui

Shallows is a shadcn/ui theme built around a muted deep purple primary color (#1e191f) with muted deep pink accents (#1f191d). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the muted deep purple primary (#1e191f) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfbfewhite
#000000black
Foreground
#080109black
#f8f6f9whitesmoke
Card
#fcf7fdghostwhite
#030303black
Card foreground
#040104black
#fbf9fbsnow
Popover
#fdfbfewhite
#000000black
Popover foreground
#080109black
#f8f6f9whitesmoke
Primary
#1e191fblack
#1e191fblack
Primary foreground
#baaebcsilver
#baaebcsilver
Secondary
#1b191fblack
#1b191fblack
Secondary foreground
#b3aebcdarkgray
#b3aebcdarkgray
Muted
#d7cee9gainsboro
#1f1631black
Muted foreground
#57535fdimgray
#a4a0acdarkgray
Accent
#1f191dblack
#1f191dblack
Accent foreground
#bcaeb8silver
#bcaeb8silver
Destructive
#c11610firebrick
#ee312bcrimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1e191fblack
#1e191fblack

Contrast

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

Light mode
Text on background20.04:1AAA
Text on card19.61:1AAA
Primary button8.11:1AAA
Secondary button8.02:1AAA
Muted text4.94:1AA
Accent8.12:1AAA
Destructive6.18:1AA
Dark mode
Text on background19.54:1AAA
Text on card19.73:1AAA
Primary button8.11:1AAA
Secondary button8.02:1AAA
Muted text6.71:1AA
Accent8.12:1AAA
Destructive4.11:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 320.539);
  --foreground: oklch(0.103 0.034 323.093);
  --muted: oklch(0.867 0.037 300.8);
  --muted-foreground: oklch(0.451 0.021 300.751);
  --popover: oklch(0.991 0.005 320.539);
  --popover-foreground: oklch(0.103 0.034 323.093);
  --card: oklch(0.981 0.01 320.547);
  --card-foreground: oklch(0.082 0.027 323.093);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.222 0.013 320.619);
  --primary-foreground: oklch(0.765 0.025 320.581);
  --secondary: oklch(0.219 0.011 300.671);
  --secondary-foreground: oklch(0.758 0.022 301.035);
  --accent: oklch(0.223 0.011 338.25);
  --accent-foreground: oklch(0.765 0.022 337.827);
  --destructive: oklch(0.517 0.202 29.025);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.222 0.013 320.619);
  --chart-1: oklch(0.222 0.013 320.619);
  --chart-2: oklch(0.219 0.011 300.671);
  --chart-3: oklch(0.223 0.011 338.25);
  --chart-4: oklch(0.25 0.014 300.605);
  --chart-5: oklch(0.221 0.017 320.643);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.976 0.005 320.539);
  --muted: oklch(0.228 0.051 297.604);
  --muted-foreground: oklch(0.712 0.018 301.074);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.976 0.005 320.539);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.984 0.003 320.536);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.222 0.013 320.619);
  --primary-foreground: oklch(0.765 0.025 320.581);
  --secondary: oklch(0.219 0.011 300.671);
  --secondary-foreground: oklch(0.758 0.022 301.035);
  --accent: oklch(0.223 0.011 338.25);
  --accent-foreground: oklch(0.765 0.022 337.827);
  --destructive: oklch(0.617 0.224 28.137);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.222 0.013 320.619);
  --chart-1: oklch(0.222 0.013 320.619);
  --chart-2: oklch(0.219 0.011 300.671);
  --chart-3: oklch(0.223 0.011 338.25);
  --chart-4: oklch(0.25 0.014 300.605);
  --chart-5: oklch(0.221 0.017 320.643);
}