Questionnaire for shadcn/ui

Questionnaire is a shadcn/ui theme built around a vivid deep blue primary color (#032759) with muted light blue accents (#cdd2db). The light mode uses a neutral background (#f8fafc). Dark mode keeps the vivid deep blue primary (#032759) on a blue-tinted background (#04070b).

Color palette

TokenLightDark
Background
#f8fafcghostwhite
#04070bblack
Foreground
#03070dblack
#fcfcfdwhite
Card
#f8fafcghostwhite
#04070bblack
Card foreground
#03070dblack
#fcfcfdwhite
Popover
#f8fafcghostwhite
#04070bblack
Popover foreground
#03070dblack
#fcfcfdwhite
Primary
#032759midnightblue
#032759midnightblue
Primary foreground
#92befclightskyblue
#92befclightskyblue
Secondary
#e1e3e5gainsboro
#202327darkslategray
Secondary foreground
#444950darkslategray
#b6bcc3silver
Muted
#f0f2f5whitesmoke
#0a0c0fblack
Muted foreground
#4a4c4fdarkslategray
#b0b2b5darkgray
Accent
#cdd2dblightgrey
#303945darkslategray
Accent foreground
#313944darkslategray
#ccd2dblightgrey
Destructive
#b93704firebrick
#fa4e0aorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#032759midnightblue
#032759midnightblue

Contrast

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

Light mode
Text on background19.23:1AAA
Text on card19.23:1AAA
Primary button7.66:1AAA
Secondary button7.02:1AAA
Muted text7.66:1AAA
Accent7.71:1AAA
Destructive5.81:1AA
Dark mode
Text on background19.67:1AAA
Text on card19.67:1AAA
Primary button7.66:1AAA
Secondary button8.22:1AAA
Muted text9.19:1AAA
Accent7.69:1AAA
Destructive3.40:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.004 256.667);
  --foreground: oklch(0.124 0.018 247.599);
  --muted: oklch(0.96 0.005 256.672);
  --muted-foreground: oklch(0.416 0.005 256.699);
  --popover: oklch(0.983 0.004 256.667);
  --popover-foreground: oklch(0.124 0.018 247.599);
  --card: oklch(0.983 0.004 256.667);
  --card-foreground: oklch(0.124 0.018 247.599);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.282 0.099 258.108);
  --primary-foreground: oklch(0.794 0.1 256.867);
  --secondary: oklch(0.914 0.004 256.67);
  --secondary-foreground: oklch(0.403 0.013 256.756);
  --accent: oklch(0.863 0.013 256.707);
  --accent-foreground: oklch(0.342 0.022 256.808);
  --destructive: oklch(0.527 0.174 37.098);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.282 0.099 258.108);
  --chart-1: oklch(0.282 0.099 258.108);
  --chart-2: oklch(0.914 0.004 256.67);
  --chart-3: oklch(0.863 0.013 256.707);
  --chart-4: oklch(0.938 0.003 256.665);
  --chart-5: oklch(0.282 0.102 258.091);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.012 250.241);
  --foreground: oklch(0.992 0.001 256.656);
  --muted: oklch(0.155 0.008 256.813);
  --muted-foreground: oklch(0.763 0.004 256.675);
  --popover: oklch(0.127 0.012 250.241);
  --popover-foreground: oklch(0.992 0.001 256.656);
  --card: oklch(0.127 0.012 250.241);
  --card-foreground: oklch(0.992 0.001 256.656);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.282 0.099 258.108);
  --primary-foreground: oklch(0.794 0.1 256.867);
  --secondary: oklch(0.255 0.009 256.761);
  --secondary-foreground: oklch(0.792 0.013 256.711);
  --accent: oklch(0.341 0.025 256.818);
  --accent-foreground: oklch(0.863 0.014 256.713);
  --destructive: oklch(0.661 0.218 37.031);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.282 0.099 258.108);
  --chart-1: oklch(0.282 0.099 258.108);
  --chart-2: oklch(0.255 0.009 256.761);
  --chart-3: oklch(0.341 0.025 256.818);
  --chart-4: oklch(0.286 0.011 256.765);
  --chart-5: oklch(0.282 0.102 258.091);
}