Pastel for shadcn/ui

Pastel is a shadcn/ui theme built around a muted green primary color (#81956f) with muted violet accents (#836f95). The light mode uses a neutral background (#fcfdfc). Dark mode keeps the muted green primary (#81956f) on a green-tinted background (#0a0d07).

Color palette

TokenLightDark
Background
#fcfdfcwhite
#0a0d07black
Foreground
#020401black
#fafbf9snow
Card
#fafcf8snow
#0d1109black
Card foreground
#000000black
#fcfdfcwhite
Popover
#fafcf8snow
#0d1109black
Popover foreground
#000000black
#fcfdfcwhite
Primary
#81956fgray
#81956fgray
Primary foreground
#000000black
#000000black
Secondary
#836f95slategray
#836f95slategray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ede7f4lavender
#120b18black
Muted foreground
#4d4653darkslategray
#b3acb9darkgray
Accent
#836f95slategray
#836f95slategray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#b2290afirebrick
#f2441corangered
Destructive foreground
#fef3f1seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#81956fgray
#81956fgray

Contrast

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

Light mode
Text on background20.23:1AAA
Text on card20.28:1AAA
Primary button6.45:1AA
Secondary button4.48:1AA Large
Muted text7.46:1AAA
Accent4.48:1AA Large
Destructive5.98:1AA
Dark mode
Text on background18.80:1AAA
Text on card18.73:1AAA
Primary button6.45:1AA
Secondary button4.48:1AA Large
Muted text8.74:1AAA
Accent4.48:1AA Large
Destructive3.74:1AA Large

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.002 129.151);
  --foreground: oklch(0.102 0.019 127.71);
  --muted: oklch(0.936 0.019 308.912);
  --muted-foreground: oklch(0.406 0.022 308.565);
  --popover: oklch(0.988 0.005 129.177);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.005 129.177);
  --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.644 0.058 130.142);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.575 0.061 308.011);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.575 0.061 308.011);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.501 0.178 33.133);
  --destructive-foreground: oklch(0.972 0.012 32.665);
  --ring: oklch(0.644 0.058 130.142);
  --chart-1: oklch(0.644 0.058 130.142);
  --chart-2: oklch(0.575 0.061 308.011);
  --chart-3: oklch(0.575 0.061 308.011);
  --chart-4: oklch(0.602 0.056 308.14);
  --chart-5: oklch(0.651 0.069 130.342);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.155 0.015 129.303);
  --foreground: oklch(0.986 0.003 129.154);
  --muted: oklch(0.167 0.029 307.258);
  --muted-foreground: oklch(0.755 0.019 308.866);
  --popover: oklch(0.169 0.018 130.197);
  --popover-foreground: oklch(0.993 0.001 129.14);
  --card: oklch(0.169 0.018 130.197);
  --card-foreground: oklch(0.993 0.001 129.14);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.644 0.058 130.142);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.575 0.061 308.011);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.575 0.061 308.011);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.638 0.216 33.571);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.644 0.058 130.142);
  --chart-1: oklch(0.644 0.058 130.142);
  --chart-2: oklch(0.575 0.061 308.011);
  --chart-3: oklch(0.575 0.061 308.011);
  --chart-4: oklch(0.602 0.056 308.14);
  --chart-5: oklch(0.651 0.069 130.342);
}