Chapter for shadcn/ui

Chapter is a shadcn/ui theme built around a green primary color (#36d341) with purple accents (#d336c8). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#36d341) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#010401black
#f6f9f6whitesmoke
Card
#ffffffwhite
#000000black
Card foreground
#010401black
#f6f9f6whitesmoke
Popover
#ffffffwhite
#000000black
Popover foreground
#010401black
#f6f9f6whitesmoke
Primary
#36d341limegreen
#36d341limegreen
Primary foreground
#0b320eblack
#0b320eblack
Secondary
#d336c8mediumorchid
#d336c8mediumorchid
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ecdaeblavender
#251324black
Muted foreground
#534152darkslategray
#beacbdsilver
Accent
#d336c8mediumorchid
#d336c8mediumorchid
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#ac1106firebrick
#f7392borangered
Destructive foreground
#fee8e6mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#36d341limegreen
#36d341limegreen

Contrast

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

Light mode
Text on background20.60:1AAA
Text on card20.60:1AAA
Primary button7.14:1AAA
Secondary button4.08:1AA Large
Muted text7.02:1AAA
Accent4.08:1AA Large
Destructive6.29:1AA
Dark mode
Text on background19.79:1AAA
Text on card19.79:1AAA
Primary button7.14:1AAA
Secondary button4.08:1AA Large
Muted text8.20:1AAA
Accent4.08:1AA Large
Destructive3.75: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.098 0.021 145.898);
  --muted: oklch(0.907 0.031 327.872);
  --muted-foreground: oklch(0.401 0.036 328.389);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.098 0.021 145.898);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.098 0.021 145.898);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.759 0.226 143.744);
  --primary-foreground: oklch(0.281 0.076 144.226);
  --secondary: oklch(0.624 0.243 331.017);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.624 0.243 331.017);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.474 0.186 29.809);
  --destructive-foreground: oklch(0.948 0.024 22.517);
  --ring: oklch(0.759 0.226 143.744);
  --chart-1: oklch(0.759 0.226 143.744);
  --chart-2: oklch(0.624 0.243 331.017);
  --chart-3: oklch(0.624 0.243 331.017);
  --chart-4: oklch(0.64 0.234 330.77);
  --chart-5: oklch(0.768 0.232 143.634);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.979 0.006 147.486);
  --muted: oklch(0.22 0.043 329.297);
  --muted-foreground: oklch(0.765 0.031 327.932);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.979 0.006 147.486);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.979 0.006 147.486);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.759 0.226 143.744);
  --primary-foreground: oklch(0.281 0.076 144.226);
  --secondary: oklch(0.624 0.243 331.017);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.624 0.243 331.017);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.639 0.227 29.201);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.759 0.226 143.744);
  --chart-1: oklch(0.759 0.226 143.744);
  --chart-2: oklch(0.624 0.243 331.017);
  --chart-3: oklch(0.624 0.243 331.017);
  --chart-4: oklch(0.64 0.234 330.77);
  --chart-5: oklch(0.768 0.232 143.634);
}