Shallows for shadcn/ui

Shallows is a shadcn/ui theme built around a near-black primary color (#010809) with near-black accents (#090201). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#010809) on a neutral background (#020303).

Color palette

TokenLightDark
Background
#ffffffwhite
#020303black
Foreground
#000000black
#fcfdfdwhite
Card
#ffffffwhite
#020303black
Card foreground
#000000black
#fcfdfdwhite
Popover
#ffffffwhite
#020303black
Popover foreground
#000000black
#fcfdfdwhite
Primary
#010809black
#010809black
Primary foreground
#10b1c6lightseagreen
#10b1c6lightseagreen
Secondary
#090201black
#090201black
Secondary foreground
#f05f4ctomato
#f05f4ctomato
Muted
#f3e9e8linen
#170e0cblack
Muted foreground
#65504edimgray
#b19d9adarkgray
Accent
#090201black
#090201black
Accent foreground
#f05f4ctomato
#f05f4ctomato
Destructive
#612a0asaddlebrown
#e26218chocolate
Destructive foreground
#f6c4a7navajowhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#010809black
#010809black

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.80:1AAA
Secondary button6.31:1AA
Muted text6.26:1AA
Accent6.31:1AA
Destructive7.25:1AAA
Dark mode
Text on background20.25:1AAA
Text on card20.25:1AAA
Primary button7.80:1AAA
Secondary button6.31:1AA
Muted text7.39:1AAA
Accent6.31:1AA
Destructive5.99:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.941 0.01 26.516);
  --muted-foreground: oklch(0.453 0.028 26.975);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.126 0.019 202.518);
  --primary-foreground: oklch(0.697 0.119 210.096);
  --secondary: oklch(0.103 0.025 37.137);
  --secondary-foreground: oklch(0.67 0.183 30.13);
  --accent: oklch(0.103 0.025 37.137);
  --accent-foreground: oklch(0.67 0.183 30.13);
  --destructive: oklch(0.357 0.09 46.349);
  --destructive-foreground: oklch(0.857 0.069 51.555);
  --ring: oklch(0.126 0.019 202.518);
  --chart-1: oklch(0.126 0.019 202.518);
  --chart-2: oklch(0.103 0.025 37.137);
  --chart-3: oklch(0.103 0.025 37.137);
  --chart-4: oklch(0.147 0.039 35.103);
  --chart-5: oklch(0.126 0.019 202.422);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.006 204.718);
  --foreground: oklch(0.993 0.001 206.437);
  --muted: oklch(0.175 0.017 27.36);
  --muted-foreground: oklch(0.713 0.025 26.706);
  --popover: oklch(0.095 0.006 204.718);
  --popover-foreground: oklch(0.993 0.001 206.437);
  --card: oklch(0.095 0.006 204.718);
  --card-foreground: oklch(0.993 0.001 206.437);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.126 0.019 202.518);
  --primary-foreground: oklch(0.697 0.119 210.096);
  --secondary: oklch(0.103 0.025 37.137);
  --secondary-foreground: oklch(0.67 0.183 30.13);
  --accent: oklch(0.103 0.025 37.137);
  --accent-foreground: oklch(0.67 0.183 30.13);
  --destructive: oklch(0.647 0.177 44.647);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.126 0.019 202.518);
  --chart-1: oklch(0.126 0.019 202.518);
  --chart-2: oklch(0.103 0.025 37.137);
  --chart-3: oklch(0.103 0.025 37.137);
  --chart-4: oklch(0.147 0.039 35.103);
  --chart-5: oklch(0.126 0.019 202.422);
}