Pastel for shadcn/ui

Pastel is a shadcn/ui theme built around a green primary color (#42cd79) with pink accents (#cd4295). The light mode uses a neutral background (#fbfdfc). Dark mode keeps the green primary (#42cd79) on a neutral background (#020302).

Color palette

TokenLightDark
Background
#fbfdfcwhite
#020302black
Foreground
#05140bblack
#f9fbfamintcream
Card
#f8fcf9mintcream
#030705black
Card foreground
#041009black
#fcfdfcwhite
Popover
#fbfdfcwhite
#020302black
Popover foreground
#05140bblack
#f9fbfamintcream
Primary
#42cd79mediumseagreen
#42cd79mediumseagreen
Primary foreground
#0e341ddarkgreen
#0e341ddarkgreen
Secondary
#cd4295palevioletred
#cd4295palevioletred
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ebd6e3gainsboro
#291421black
Muted foreground
#705766dimgray
#a88f9erosybrown
Accent
#cd4295palevioletred
#cd4295palevioletred
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#7e1402maroon
#fc5436tomato
Destructive foreground
#febfb4lightpink
#000000black
Border
#e5ebe7lavender
#222b25darkslategray
Input
#e5ebe7lavender
#222b25darkslategray
Ring
#42cd79mediumseagreen
#42cd79mediumseagreen

Contrast

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

Light mode
Text on background18.57:1AAA
Text on card18.72:1AAA
Primary button6.68:1AA
Secondary button4.38:1AA Large
Muted text4.69:1AA
Accent4.38:1AA Large
Destructive6.71:1AA
Dark mode
Text on background19.85:1AAA
Text on card19.88:1AAA
Primary button6.68:1AA
Secondary button4.38:1AA Large
Muted text5.82:1AA
Accent4.38:1AA Large
Destructive6.45:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 160.17);
  --foreground: oklch(0.175 0.029 156.836);
  --muted: oklch(0.896 0.029 340.955);
  --muted-foreground: oklch(0.487 0.041 342.052);
  --popover: oklch(0.994 0.003 160.17);
  --popover-foreground: oklch(0.175 0.029 156.836);
  --card: oklch(0.987 0.005 160.105);
  --card-foreground: oklch(0.159 0.024 158.423);
  --border: oklch(0.934 0.007 160.053);
  --input: oklch(0.934 0.007 160.053);
  --primary: oklch(0.753 0.169 152.868);
  --primary-foreground: oklch(0.292 0.06 153.731);
  --secondary: oklch(0.6 0.193 347.546);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.6 0.193 347.546);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.383 0.142 32.296);
  --destructive-foreground: oklch(0.858 0.075 30.033);
  --ring: oklch(0.753 0.169 152.868);
  --chart-1: oklch(0.753 0.169 152.868);
  --chart-2: oklch(0.6 0.193 347.546);
  --chart-3: oklch(0.6 0.193 347.546);
  --chart-4: oklch(0.62 0.183 346.743);
  --chart-5: oklch(0.761 0.175 152.521);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.008 160.163);
  --foreground: oklch(0.986 0.003 160.174);
  --muted: oklch(0.226 0.041 344.025);
  --muted-foreground: oklch(0.677 0.038 341.455);
  --popover: oklch(0.095 0.008 160.163);
  --popover-foreground: oklch(0.986 0.003 160.174);
  --card: oklch(0.12 0.01 160.163);
  --card-foreground: oklch(0.993 0.001 160.204);
  --border: oklch(0.278 0.016 158.811);
  --input: oklch(0.278 0.016 158.811);
  --primary: oklch(0.753 0.169 152.868);
  --primary-foreground: oklch(0.292 0.06 153.731);
  --secondary: oklch(0.6 0.193 347.546);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.6 0.193 347.546);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.672 0.209 32.369);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.753 0.169 152.868);
  --chart-1: oklch(0.753 0.169 152.868);
  --chart-2: oklch(0.6 0.193 347.546);
  --chart-3: oklch(0.6 0.193 347.546);
  --chart-4: oklch(0.62 0.183 346.743);
  --chart-5: oklch(0.761 0.175 152.521);
}