Pretty for shadcn/ui

Pretty is a shadcn/ui theme built around a light green primary color (#f4f7e3) with light green accents (#e9f7e3). The light mode uses a neutral background (#ffffff). Dark mode keeps the light green primary (#f4f7e3) on a green-tinted background (#0e1004).

Color palette

TokenLightDark
Background
#ffffffwhite
#0e1004black
Foreground
#121504black
#f9f9f5whitesmoke
Card
#ffffffwhite
#0e1004black
Card foreground
#121504black
#f9f9f5whitesmoke
Popover
#ffffffwhite
#0e1004black
Popover foreground
#121504black
#f9f9f5whitesmoke
Primary
#f4f7e3beige
#f4f7e3beige
Primary foreground
#2d340edarkgreen
#2d340edarkgreen
Secondary
#f7f1e3linen
#f7f1e3linen
Secondary foreground
#34280eblack
#34280eblack
Muted
#efeeeblinen
#141310black
Muted foreground
#646462dimgray
#9d9c9bdarkgray
Accent
#e9f7e3beige
#e9f7e3beige
Accent foreground
#1a340edarkgreen
#1a340edarkgreen
Destructive
#dd5003orangered
#fb5e09orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f4f7e3beige
#f4f7e3beige

Contrast

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

Light mode
Text on background18.50:1AAA
Text on card18.50:1AAA
Primary button11.98:1AAA
Secondary button12.80:1AAA
Muted text5.11:1AA
Accent12.28:1AAA
Destructive4.02:1AA Large
Dark mode
Text on background18.18:1AAA
Text on card18.18:1AAA
Primary button11.98:1AAA
Secondary button12.80:1AAA
Muted text6.79:1AA
Accent12.28:1AAA
Destructive6.70:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.187 0.032 117.639);
  --muted: oklch(0.949 0.004 86.024);
  --muted-foreground: oklch(0.503 0.002 86.024);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.187 0.032 117.639);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.187 0.032 117.639);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.969 0.027 115.339);
  --primary-foreground: oklch(0.309 0.058 118.739);
  --secondary: oklch(0.959 0.02 86.073);
  --secondary-foreground: oklch(0.285 0.044 84.415);
  --accent: oklch(0.961 0.031 135.567);
  --accent-foreground: oklch(0.294 0.07 137.094);
  --destructive: oklch(0.615 0.189 40.638);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.969 0.027 115.339);
  --chart-1: oklch(0.969 0.027 115.339);
  --chart-2: oklch(0.959 0.02 86.073);
  --chart-3: oklch(0.961 0.031 135.567);
  --chart-4: oklch(0.977 0.011 86.049);
  --chart-5: oklch(0.97 0.028 115.365);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.166 0.024 116.799);
  --foreground: oklch(0.982 0.006 114.931);
  --muted: oklch(0.186 0.006 86.093);
  --muted-foreground: oklch(0.693 0.002 86.019);
  --popover: oklch(0.166 0.024 116.799);
  --popover-foreground: oklch(0.982 0.006 114.931);
  --card: oklch(0.166 0.024 116.799);
  --card-foreground: oklch(0.982 0.006 114.931);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.969 0.027 115.339);
  --primary-foreground: oklch(0.309 0.058 118.739);
  --secondary: oklch(0.959 0.02 86.073);
  --secondary-foreground: oklch(0.285 0.044 84.415);
  --accent: oklch(0.961 0.031 135.567);
  --accent-foreground: oklch(0.294 0.07 137.094);
  --destructive: oklch(0.68 0.207 40.998);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.969 0.027 115.339);
  --chart-1: oklch(0.969 0.027 115.339);
  --chart-2: oklch(0.959 0.02 86.073);
  --chart-3: oklch(0.961 0.031 135.567);
  --chart-4: oklch(0.977 0.011 86.049);
  --chart-5: oklch(0.97 0.028 115.365);
}