Democrat for shadcn/ui

Democrat is a shadcn/ui theme built around a blue primary color (#2a9cd5) with orange accents (#d5632a). The light mode uses a neutral background (#fcfdfd). Dark mode keeps the blue primary (#2a9cd5) on a blue-tinted background (#050c0f).

Color palette

TokenLightDark
Background
#fcfdfdwhite
#050c0fblack
Foreground
#041015black
#fcfdfdwhite
Card
#f8fbfcghostwhite
#070f13black
Card foreground
#030c11black
#ffffffwhite
Popover
#fcfdfdwhite
#050c0fblack
Popover foreground
#041015black
#fcfdfdwhite
Primary
#2a9cd5dodgerblue
#2a9cd5dodgerblue
Primary foreground
#000000black
#000000black
Secondary
#d5632achocolate
#d5632achocolate
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eae8e6linen
#191615black
Muted foreground
#5a5958dimgray
#a7a5a5darkgray
Accent
#d5632achocolate
#d5632achocolate
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#8b1209darkred
#f23e31tomato
Destructive foreground
#fccecapink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2a9cd5dodgerblue
#2a9cd5dodgerblue

Contrast

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

Light mode
Text on background18.86:1AAA
Text on card18.91:1AAA
Primary button6.81:1AA
Secondary button3.71:1AA Large
Muted text5.69:1AA
Accent3.71:1AA Large
Destructive6.78:1AA
Dark mode
Text on background19.34:1AAA
Text on card19.35:1AAA
Primary button6.81:1AA
Secondary button3.71:1AA Large
Muted text7.32:1AAA
Accent3.71:1AA Large
Destructive3.82:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 228.771);
  --foreground: oklch(0.163 0.022 229.004);
  --muted: oklch(0.931 0.003 48.715);
  --muted-foreground: oklch(0.465 0.002 48.703);
  --popover: oklch(0.993 0.002 228.771);
  --popover-foreground: oklch(0.163 0.022 229.004);
  --card: oklch(0.985 0.003 228.791);
  --card-foreground: oklch(0.149 0.019 226.641);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.657 0.129 236.178);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.63 0.159 44.191);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.63 0.159 44.191);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.409 0.156 29.677);
  --destructive-foreground: oklch(0.889 0.053 22.967);
  --ring: oklch(0.657 0.129 236.178);
  --chart-1: oklch(0.657 0.129 236.178);
  --chart-2: oklch(0.63 0.159 44.191);
  --chart-3: oklch(0.63 0.159 44.191);
  --chart-4: oklch(0.649 0.15 45.098);
  --chart-5: oklch(0.661 0.133 236.691);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.148 0.013 227.35);
  --foreground: oklch(0.992 0.001 228.76);
  --muted: oklch(0.204 0.004 48.517);
  --muted-foreground: oklch(0.724 0.002 48.723);
  --popover: oklch(0.148 0.013 227.35);
  --popover-foreground: oklch(0.992 0.001 228.76);
  --card: oklch(0.161 0.015 229.42);
  --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.657 0.129 236.178);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.63 0.159 44.191);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.63 0.159 44.191);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.634 0.218 28.939);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.657 0.129 236.178);
  --chart-1: oklch(0.657 0.129 236.178);
  --chart-2: oklch(0.63 0.159 44.191);
  --chart-3: oklch(0.63 0.159 44.191);
  --chart-4: oklch(0.649 0.15 45.098);
  --chart-5: oklch(0.661 0.133 236.691);
}