Quizzical for shadcn/ui

Quizzical is a shadcn/ui theme built around a purple primary color (#7a2692) with muted light purple accents (#d1bdd6). The light mode uses a neutral background (#fdfbfd). Dark mode keeps the purple primary (#7a2692) on a purple-tinted background (#09050b).

Color palette

TokenLightDark
Background
#fdfbfdsnow
#09050bblack
Foreground
#070308black
#fdfcfdwhite
Card
#fdfbfdsnow
#09050bblack
Card foreground
#070308black
#fdfcfdwhite
Popover
#fdfbfdsnow
#09050bblack
Popover foreground
#070308black
#fdfcfdwhite
Primary
#7a2692rebeccapurple
#7a2692rebeccapurple
Primary foreground
#f8effbwhitesmoke
#f8effbwhitesmoke
Secondary
#dcd3dfgainsboro
#272428darkslategray
Secondary foreground
#46364adarkslategray
#c1bcc2silver
Muted
#f0eff0whitesmoke
#100f10black
Muted foreground
#604d66dimgray
#ad99b2darkgray
Accent
#d1bdd6thistle
#3e3441darkslategray
Accent foreground
#37253cdarkslategray
#d6cfd8lightgrey
Destructive
#84150bmaroon
#ef4434tomato
Destructive foreground
#facbc6pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7a2692rebeccapurple
#7a2692rebeccapurple

Contrast

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

Light mode
Text on background19.94:1AAA
Text on card19.94:1AAA
Primary button7.42:1AAA
Secondary button7.62:1AAA
Muted text6.65:1AA
Accent7.98:1AAA
Destructive6.89:1AA
Dark mode
Text on background19.79:1AAA
Text on card19.79:1AAA
Primary button7.42:1AAA
Secondary button8.17:1AAA
Muted text7.28:1AAA
Accent7.74:1AAA
Destructive3.80: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.991 0.003 318.889);
  --foreground: oklch(0.107 0.021 320.572);
  --muted: oklch(0.953 0.002 318.89);
  --muted-foreground: oklch(0.449 0.047 318.846);
  --popover: oklch(0.991 0.003 318.889);
  --popover-foreground: oklch(0.107 0.021 320.572);
  --card: oklch(0.991 0.003 318.889);
  --card-foreground: oklch(0.107 0.021 320.572);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.447 0.177 317.887);
  --primary-foreground: oklch(0.962 0.019 318.884);
  --secondary: oklch(0.877 0.02 318.883);
  --secondary-foreground: oklch(0.357 0.04 318.84);
  --accent: oklch(0.822 0.042 318.872);
  --accent-foreground: oklch(0.296 0.048 318.797);
  --destructive: oklch(0.397 0.147 30.023);
  --destructive-foreground: oklch(0.882 0.055 24.294);
  --ring: oklch(0.447 0.177 317.887);
  --chart-1: oklch(0.447 0.177 317.887);
  --chart-2: oklch(0.877 0.02 318.883);
  --chart-3: oklch(0.822 0.042 318.872);
  --chart-4: oklch(0.902 0.016 318.884);
  --chart-5: oklch(0.448 0.183 317.755);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.02 320.195);
  --foreground: oklch(0.991 0.002 318.89);
  --muted: oklch(0.168 0.004 318.883);
  --muted-foreground: oklch(0.709 0.042 318.869);
  --popover: oklch(0.124 0.02 320.195);
  --popover-foreground: oklch(0.991 0.002 318.89);
  --card: oklch(0.124 0.02 320.195);
  --card-foreground: oklch(0.991 0.002 318.89);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.447 0.177 317.887);
  --primary-foreground: oklch(0.962 0.019 318.884);
  --secondary: oklch(0.267 0.008 318.88);
  --secondary-foreground: oklch(0.801 0.01 318.886);
  --accent: oklch(0.342 0.026 318.861);
  --accent-foreground: oklch(0.863 0.015 318.884);
  --destructive: oklch(0.634 0.21 29.396);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.447 0.177 317.887);
  --chart-1: oklch(0.447 0.177 317.887);
  --chart-2: oklch(0.267 0.008 318.88);
  --chart-3: oklch(0.342 0.026 318.861);
  --chart-4: oklch(0.297 0.01 318.879);
  --chart-5: oklch(0.448 0.183 317.755);
}