Pretty for shadcn/ui

Pretty is a shadcn/ui theme built around a vivid deep green primary color (#113602) with muted light green accents (#d6dfd2). The light mode uses a neutral background (#f9fdf7). Dark mode keeps the vivid deep green primary (#113602) on a green-tinted background (#081004).

Color palette

TokenLightDark
Background
#f9fdf7mintcream
#081004black
Foreground
#0a1306black
#f9fbf8mintcream
Card
#f9fdf7mintcream
#081004black
Card foreground
#0a1306black
#f9fbf8mintcream
Popover
#f9fdf7mintcream
#081004black
Popover foreground
#0a1306black
#f9fbf8mintcream
Primary
#113602darkgreen
#113602darkgreen
Primary foreground
#50f60elawngreen
#50f60elawngreen
Secondary
#d6dfd2gainsboro
#282c26darkslategray
Secondary foreground
#3b4b35darkslategray
#c0c6besilver
Muted
#d7e6d1gainsboro
#1f2e19black
Muted foreground
#4a4a4adarkslategray
#b5b5b5silver
Accent
#d6dfd2gainsboro
#282c26darkslategray
Accent foreground
#3b4b35darkslategray
#c0c6besilver
Destructive
#c44a08chocolate
#dc5309chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#113602darkgreen
#113602darkgreen

Contrast

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

Light mode
Text on background18.36:1AAA
Text on card18.36:1AAA
Primary button9.34:1AAA
Secondary button6.85:1AA
Muted text6.78:1AA
Accent6.85:1AA
Destructive4.85:1AA
Dark mode
Text on background18.57:1AAA
Text on card18.57:1AAA
Primary button9.34:1AAA
Secondary button8.19:1AAA
Muted text6.99:1AA
Accent8.19:1AAA
Destructive3.96:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.008 136.633);
  --foreground: oklch(0.174 0.03 136.546);
  --muted: oklch(0.907 0.032 136.717);
  --muted-foreground: oklch(0.409 0 190.305);
  --popover: oklch(0.988 0.008 136.633);
  --popover-foreground: oklch(0.174 0.03 136.546);
  --card: oklch(0.988 0.008 136.633);
  --card-foreground: oklch(0.174 0.03 136.546);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.295 0.089 138.544);
  --primary-foreground: oklch(0.854 0.273 140.079);
  --secondary: oklch(0.894 0.02 136.677);
  --secondary-foreground: oklch(0.391 0.041 136.964);
  --accent: oklch(0.894 0.02 136.677);
  --accent-foreground: oklch(0.391 0.041 136.964);
  --destructive: oklch(0.567 0.169 41.693);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.295 0.089 138.544);
  --chart-1: oklch(0.295 0.089 138.544);
  --chart-2: oklch(0.894 0.02 136.677);
  --chart-3: oklch(0.894 0.02 136.677);
  --chart-4: oklch(0.915 0.016 136.662);
  --chart-5: oklch(0.297 0.091 138.566);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.16 0.029 135.652);
  --foreground: oklch(0.987 0.005 136.623);
  --muted: oklch(0.281 0.042 137.171);
  --muted-foreground: oklch(0.773 0 180);
  --popover: oklch(0.16 0.029 135.652);
  --popover-foreground: oklch(0.987 0.005 136.623);
  --card: oklch(0.16 0.029 135.652);
  --card-foreground: oklch(0.987 0.005 136.623);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.295 0.089 138.544);
  --primary-foreground: oklch(0.854 0.273 140.079);
  --secondary: oklch(0.286 0.012 136.736);
  --secondary-foreground: oklch(0.82 0.014 136.659);
  --accent: oklch(0.286 0.012 136.736);
  --accent-foreground: oklch(0.82 0.014 136.659);
  --destructive: oklch(0.618 0.185 41.453);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.295 0.089 138.544);
  --chart-1: oklch(0.295 0.089 138.544);
  --chart-2: oklch(0.286 0.012 136.736);
  --chart-3: oklch(0.286 0.012 136.736);
  --chart-4: oklch(0.317 0.014 136.741);
  --chart-5: oklch(0.297 0.091 138.566);
}