Comprehension for shadcn/ui

Comprehension is a shadcn/ui theme built around a light violet primary color (#e3d4f2) with light teal accents (#d4f2e3). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the light violet primary (#e3d4f2) on a neutral background (#030204).

Color palette

TokenLightDark
Background
#fcfbfewhite
#030204black
Foreground
#0a0212black
#ffffffwhite
Card
#fcfbfewhite
#030204black
Card foreground
#0a0212black
#ffffffwhite
Popover
#fcfbfewhite
#030204black
Popover foreground
#0a0212black
#ffffffwhite
Primary
#e3d4f2lavender
#e3d4f2lavender
Primary foreground
#4b2173indigo
#4b2173indigo
Secondary
#f2e3d4antiquewhite
#f2e3d4antiquewhite
Secondary foreground
#734b21saddlebrown
#734b21saddlebrown
Muted
#f5f2efwhitesmoke
#100d0ablack
Muted foreground
#665a4ddimgray
#b2a699darkgray
Accent
#d4f2e3gainsboro
#d4f2e3gainsboro
Accent foreground
#0a2417black
#0a2417black
Destructive
#b83a14firebrick
#d84518chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e3d4f2lavender
#e3d4f2lavender

Contrast

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

Light mode
Text on background19.80:1AAA
Text on card19.80:1AAA
Primary button8.46:1AAA
Secondary button6.08:1AA
Muted text6.02:1AA
Accent13.81:1AAA
Destructive5.74:1AA
Dark mode
Text on background20.75:1AAA
Text on card20.75:1AAA
Primary button8.46:1AAA
Secondary button6.08:1AA
Muted text8.13:1AAA
Accent13.81:1AAA
Destructive4.40:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 309.086);
  --foreground: oklch(0.123 0.042 309.051);
  --muted: oklch(0.964 0.005 69.599);
  --muted-foreground: oklch(0.474 0.026 69.018);
  --popover: oklch(0.99 0.004 309.086);
  --popover-foreground: oklch(0.123 0.042 309.051);
  --card: oklch(0.99 0.004 309.086);
  --card-foreground: oklch(0.123 0.042 309.051);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.891 0.045 308.596);
  --primary-foreground: oklch(0.353 0.134 303.948);
  --secondary: oklch(0.925 0.027 69.344);
  --secondary-foreground: oklch(0.449 0.078 65.155);
  --accent: oklch(0.936 0.038 164.888);
  --accent-foreground: oklch(0.234 0.04 160.024);
  --destructive: oklch(0.529 0.168 36.111);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.891 0.045 308.596);
  --chart-1: oklch(0.891 0.045 308.596);
  --chart-2: oklch(0.925 0.027 69.344);
  --chart-3: oklch(0.936 0.038 164.888);
  --chart-4: oklch(0.945 0.019 69.439);
  --chart-5: oklch(0.889 0.047 308.566);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.012 310.197);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.161 0.008 69.077);
  --muted-foreground: oklch(0.732 0.023 69.315);
  --popover: oklch(0.085 0.012 310.197);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.085 0.012 310.197);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.891 0.045 308.596);
  --primary-foreground: oklch(0.353 0.134 303.948);
  --secondary: oklch(0.925 0.027 69.344);
  --secondary-foreground: oklch(0.449 0.078 65.155);
  --accent: oklch(0.936 0.038 164.888);
  --accent-foreground: oklch(0.234 0.04 160.024);
  --destructive: oklch(0.595 0.191 35.976);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.891 0.045 308.596);
  --chart-1: oklch(0.891 0.045 308.596);
  --chart-2: oklch(0.925 0.027 69.344);
  --chart-3: oklch(0.936 0.038 164.888);
  --chart-4: oklch(0.945 0.019 69.439);
  --chart-5: oklch(0.889 0.047 308.566);
}