Prudent for shadcn/ui

Prudent is a shadcn/ui theme built around a blue primary color (#879dd4) with green accents (#9dd487). The light mode uses a neutral background (#f7f8fd). Dark mode keeps the blue primary (#879dd4) on a neutral background (#020408).

Color palette

TokenLightDark
Background
#f7f8fdghostwhite
#020408black
Foreground
#000000black
#ffffffwhite
Card
#f7f8fdghostwhite
#020408black
Card foreground
#000000black
#ffffffwhite
Popover
#f7f8fdghostwhite
#020408black
Popover foreground
#000000black
#ffffffwhite
Primary
#879dd4cornflowerblue
#879dd4cornflowerblue
Primary foreground
#0b101eblack
#0b101eblack
Secondary
#d4879dpalevioletred
#d4879dpalevioletred
Secondary foreground
#1e0b10black
#1e0b10black
Muted
#f6eff1whitesmoke
#10090bblack
Muted foreground
#636363dimgray
#9c9c9cdarkgray
Accent
#9dd487darkseagreen
#9dd487darkseagreen
Accent foreground
#101e0bblack
#101e0bblack
Destructive
#a21a02darkred
#e82502orangered
Destructive foreground
#ffddd7mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#879dd4cornflowerblue
#879dd4cornflowerblue

Contrast

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

Light mode
Text on background19.84:1AAA
Text on card19.84:1AAA
Primary button7.03:1AAA
Secondary button6.97:1AA
Muted text5.28:1AA
Accent10.03:1AAA
Destructive6.20:1AA
Dark mode
Text on background20.53:1AAA
Text on card20.53:1AAA
Primary button7.03:1AAA
Secondary button6.97:1AA
Muted text7.16:1AAA
Accent10.03:1AAA
Destructive4.46:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.007 268.744);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.957 0.008 357.957);
  --muted-foreground: oklch(0.501 0 180);
  --popover: oklch(0.981 0.007 268.744);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.981 0.007 268.744);
  --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.699 0.085 267.558);
  --primary-foreground: oklch(0.176 0.03 266.931);
  --secondary: oklch(0.709 0.097 1.489);
  --secondary-foreground: oklch(0.181 0.034 3.004);
  --accent: oklch(0.812 0.118 137.159);
  --accent-foreground: oklch(0.216 0.04 137.413);
  --destructive: oklch(0.458 0.173 31.847);
  --destructive-foreground: oklch(0.923 0.039 29.672);
  --ring: oklch(0.699 0.085 267.558);
  --chart-1: oklch(0.699 0.085 267.558);
  --chart-2: oklch(0.709 0.097 1.489);
  --chart-3: oklch(0.812 0.118 137.159);
  --chart-4: oklch(0.735 0.087 0.97);
  --chart-5: oklch(0.697 0.09 267.452);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.105 0.015 260.761);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.152 0.013 0.003);
  --muted-foreground: oklch(0.691 0 180);
  --popover: oklch(0.105 0.015 260.761);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.105 0.015 260.761);
  --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.699 0.085 267.558);
  --primary-foreground: oklch(0.176 0.03 266.931);
  --secondary: oklch(0.709 0.097 1.489);
  --secondary-foreground: oklch(0.181 0.034 3.004);
  --accent: oklch(0.812 0.118 137.159);
  --accent-foreground: oklch(0.216 0.04 137.413);
  --destructive: oklch(0.597 0.229 31.378);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.699 0.085 267.558);
  --chart-1: oklch(0.699 0.085 267.558);
  --chart-2: oklch(0.709 0.097 1.489);
  --chart-3: oklch(0.812 0.118 137.159);
  --chart-4: oklch(0.735 0.087 0.97);
  --chart-5: oklch(0.697 0.09 267.452);
}