Quizzical for shadcn/ui

Quizzical is a shadcn/ui theme built around a neutral gray primary color (#525152) with neutral gray accents (#515251). The light mode uses a neutral background (#fdf6fd). Dark mode keeps the neutral gray primary (#525152) on a neutral background (#070307).

Color palette

TokenLightDark
Background
#fdf6fdsnow
#070307black
Foreground
#040105black
#fbf9fbsnow
Card
#fcf2fdghostwhite
#0a050ablack
Card foreground
#000000black
#fdfcfdwhite
Popover
#fdf6fdsnow
#070307black
Popover foreground
#040105black
#fbf9fbsnow
Primary
#525152darkslategray
#525152darkslategray
Primary foreground
#ebeaeblavender
#ebeaeblavender
Secondary
#515251darkslategray
#515251darkslategray
Secondary foreground
#eaebealinen
#eaebealinen
Muted
#d9e3d9gainsboro
#1c261cblack
Muted foreground
#435742darkslategray
#a9bda8darkgray
Accent
#515251darkslategray
#515251darkslategray
Accent foreground
#eaebealinen
#eaebealinen
Destructive
#d72004firebrick
#fa3b1eorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#525152darkslategray
#525152darkslategray

Contrast

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

Light mode
Text on background19.59:1AAA
Text on card19.26:1AAA
Primary button6.59:1AA
Secondary button6.54:1AA
Muted text5.95:1AA
Accent6.54:1AA
Destructive5.12:1AA
Dark mode
Text on background19.53:1AAA
Text on card19.73:1AAA
Primary button6.59:1AA
Secondary button6.54:1AA
Muted text7.80:1AAA
Accent6.54:1AA
Destructive3.66:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.012 324.2);
  --foreground: oklch(0.083 0.028 326.425);
  --muted: oklch(0.906 0.018 144.014);
  --muted-foreground: oklch(0.434 0.043 143.533);
  --popover: oklch(0.981 0.012 324.2);
  --popover-foreground: oklch(0.083 0.028 326.425);
  --card: oklch(0.972 0.018 324.235);
  --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.436 0.003 324.174);
  --primary-foreground: oklch(0.939 0.001 324.134);
  --secondary: oklch(0.438 0.003 144.086);
  --secondary-foreground: oklch(0.939 0.001 144.126);
  --accent: oklch(0.438 0.003 144.086);
  --accent-foreground: oklch(0.939 0.001 144.126);
  --destructive: oklch(0.563 0.216 31.089);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.436 0.003 324.174);
  --chart-1: oklch(0.436 0.003 324.174);
  --chart-2: oklch(0.438 0.003 144.086);
  --chart-3: oklch(0.438 0.003 144.086);
  --chart-4: oklch(0.466 0.004 144.086);
  --chart-5: oklch(0.433 0.013 324.305);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.111 0.014 325.106);
  --foreground: oklch(0.983 0.005 324.157);
  --muted: oklch(0.257 0.024 143.561);
  --muted-foreground: oklch(0.777 0.037 143.844);
  --popover: oklch(0.111 0.014 325.106);
  --popover-foreground: oklch(0.983 0.005 324.157);
  --card: oklch(0.127 0.016 325.106);
  --card-foreground: oklch(0.992 0.002 324.143);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.436 0.003 324.174);
  --primary-foreground: oklch(0.939 0.001 324.134);
  --secondary: oklch(0.438 0.003 144.086);
  --secondary-foreground: oklch(0.939 0.001 144.126);
  --accent: oklch(0.438 0.003 144.086);
  --accent-foreground: oklch(0.939 0.001 144.126);
  --destructive: oklch(0.645 0.23 31.602);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.436 0.003 324.174);
  --chart-1: oklch(0.436 0.003 324.174);
  --chart-2: oklch(0.438 0.003 144.086);
  --chart-3: oklch(0.438 0.003 144.086);
  --chart-4: oklch(0.466 0.004 144.086);
  --chart-5: oklch(0.433 0.013 324.305);
}