Chapter for shadcn/ui

Chapter is a shadcn/ui theme built around a muted purple primary color (#7d456f) with muted cyan accents (#456f7d). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted purple primary (#7d456f) on a neutral background (#040103).

Color palette

TokenLightDark
Background
#ffffffwhite
#040103black
Foreground
#12030eblack
#fdfcfdwhite
Card
#ffffffwhite
#040103black
Card foreground
#12030eblack
#fdfcfdwhite
Popover
#ffffffwhite
#040103black
Popover foreground
#12030eblack
#fdfcfdwhite
Primary
#7d456fdimgray
#7d456fdimgray
Primary foreground
#fbf8fbsnow
#fbf8fbsnow
Secondary
#6f7d45olivedrab
#6f7d45olivedrab
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e9ebe5linen
#181a14black
Muted foreground
#676d55dimgray
#a4aa92darkgray
Accent
#456f7ddimgray
#456f7ddimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#781e08maroon
#f04014orangered
Destructive foreground
#fac5b7lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7d456fdimgray
#7d456fdimgray

Contrast

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

Light mode
Text on background20.09:1AAA
Text on card20.09:1AAA
Primary button6.75:1AA
Secondary button4.47:1AA Large
Muted text4.48:1AA Large
Accent5.49:1AA
Destructive6.91:1AA
Dark mode
Text on background20.28:1AAA
Text on card20.28:1AAA
Primary button6.75:1AA
Secondary button4.47:1AA Large
Muted text7.31:1AAA
Accent5.49:1AA
Destructive3.85:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.135 0.04 336.675);
  --muted: oklch(0.937 0.007 117.966);
  --muted-foreground: oklch(0.521 0.036 119.059);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.135 0.04 336.675);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.135 0.04 336.675);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.472 0.096 337.034);
  --primary-foreground: oklch(0.983 0.004 333.951);
  --secondary: oklch(0.564 0.081 120.552);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.516 0.052 221.133);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.381 0.128 34.32);
  --destructive-foreground: oklch(0.866 0.065 34.412);
  --ring: oklch(0.472 0.096 337.034);
  --chart-1: oklch(0.472 0.096 337.034);
  --chart-2: oklch(0.564 0.081 120.552);
  --chart-3: oklch(0.516 0.052 221.133);
  --chart-4: oklch(0.596 0.086 120.574);
  --chart-5: oklch(0.472 0.105 337.338);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.086 0.017 334.574);
  --foreground: oklch(0.992 0.002 333.911);
  --muted: oklch(0.213 0.011 118.721);
  --muted-foreground: oklch(0.726 0.033 118.642);
  --popover: oklch(0.086 0.017 334.574);
  --popover-foreground: oklch(0.992 0.002 333.911);
  --card: oklch(0.086 0.017 334.574);
  --card-foreground: oklch(0.992 0.002 333.911);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.472 0.096 337.034);
  --primary-foreground: oklch(0.983 0.004 333.951);
  --secondary: oklch(0.564 0.081 120.552);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.516 0.052 221.133);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.631 0.218 33.914);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.472 0.096 337.034);
  --chart-1: oklch(0.472 0.096 337.034);
  --chart-2: oklch(0.564 0.081 120.552);
  --chart-3: oklch(0.516 0.052 221.133);
  --chart-4: oklch(0.596 0.086 120.574);
  --chart-5: oklch(0.472 0.105 337.338);
}