Pastel for shadcn/ui

Pastel is a shadcn/ui theme built around a vivid teal primary color (#18e28a) with muted light teal accents (#c0d3cb). The light mode uses a neutral background (#f7fdfa). Dark mode keeps the vivid teal primary (#18e28a) on a neutral background (#020303).

Color palette

TokenLightDark
Background
#f7fdfamintcream
#020303black
Foreground
#020d08black
#ffffffwhite
Card
#f3fcf8mintcream
#030705black
Card foreground
#010906black
#ffffffwhite
Popover
#f3fcf8mintcream
#030705black
Popover foreground
#010906black
#ffffffwhite
Primary
#18e28amediumspringgreen
#18e28amediumspringgreen
Primary foreground
#042a19black
#042a19black
Secondary
#d3d9d7lightgrey
#2f3734darkslategray
Secondary foreground
#38423edarkslategray
#c8d0cdlightgrey
Muted
#deede7gainsboro
#12211bblack
Muted foreground
#55625ddimgray
#9daaa4darkgray
Accent
#c0d3cblightgrey
#40594edarkslategray
Accent foreground
#283932darkslategray
#e1eae6gainsboro
Destructive
#681a03maroon
#f94a15orangered
Destructive foreground
#fdb6a1lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#18e28amediumspringgreen
#18e28amediumspringgreen

Contrast

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

Light mode
Text on background19.14:1AAA
Text on card19.22:1AAA
Primary button9.11:1AAA
Secondary button7.29:1AAA
Muted text5.28:1AA
Accent7.77:1AAA
Destructive7.09:1AAA
Dark mode
Text on background20.62:1AAA
Text on card20.26:1AAA
Primary button9.11:1AAA
Secondary button7.77:1AAA
Muted text6.90:1AA
Accent6.22:1AA
Destructive3.48: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.988 0.007 168.536);
  --foreground: oklch(0.146 0.023 168.168);
  --muted: oklch(0.934 0.019 168.151);
  --muted-foreground: oklch(0.484 0.018 167.645);
  --popover: oklch(0.983 0.01 168.434);
  --popover-foreground: oklch(0.126 0.02 169.043);
  --card: oklch(0.983 0.01 168.434);
  --card-foreground: oklch(0.126 0.02 169.043);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.805 0.19 156.43);
  --primary-foreground: oklch(0.252 0.052 160.306);
  --secondary: oklch(0.881 0.008 168.477);
  --secondary-foreground: oklch(0.369 0.015 167.566);
  --accent: oklch(0.849 0.022 167.976);
  --accent-foreground: oklch(0.326 0.025 166.372);
  --destructive: oklch(0.347 0.115 36.137);
  --destructive-foreground: oklch(0.837 0.088 37.624);
  --ring: oklch(0.805 0.19 156.43);
  --chart-1: oklch(0.805 0.19 156.43);
  --chart-2: oklch(0.881 0.008 168.477);
  --chart-3: oklch(0.849 0.022 167.976);
  --chart-4: oklch(0.904 0.006 168.532);
  --chart-5: oklch(0.814 0.195 156.048);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.008 168.894);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.233 0.025 165.155);
  --muted-foreground: oklch(0.725 0.017 168.083);
  --popover: oklch(0.121 0.01 168.894);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.121 0.01 168.894);
  --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.805 0.19 156.43);
  --primary-foreground: oklch(0.252 0.052 160.306);
  --secondary: oklch(0.328 0.013 167.608);
  --secondary-foreground: oklch(0.851 0.01 168.398);
  --accent: oklch(0.44 0.034 166.311);
  --accent-foreground: oklch(0.929 0.01 168.433);
  --destructive: oklch(0.656 0.218 35.446);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.805 0.19 156.43);
  --chart-1: oklch(0.805 0.19 156.43);
  --chart-2: oklch(0.328 0.013 167.608);
  --chart-3: oklch(0.44 0.034 166.311);
  --chart-4: oklch(0.359 0.014 167.576);
  --chart-5: oklch(0.814 0.195 156.048);
}