Pastel for shadcn/ui

Pastel is a shadcn/ui theme built around a yellow primary color (#cac19b) with purple accents (#c19bca). The light mode uses a neutral background (#fdfdfc). Dark mode keeps the yellow primary (#cac19b) on a yellow-tinted background (#0a0905).

Color palette

TokenLightDark
Background
#fdfdfcwhite
#0a0905black
Foreground
#120f03black
#fdfdfcwhite
Card
#fbfbf8snow
#0d0c07black
Card foreground
#0d0b02black
#ffffffwhite
Popover
#fdfdfcwhite
#0a0905black
Popover foreground
#120f03black
#fdfdfcwhite
Primary
#cac19btan
#cac19btan
Primary foreground
#211e12black
#211e12black
Secondary
#9bcac1lightsteelblue
#9bcac1lightsteelblue
Secondary foreground
#12211eblack
#12211eblack
Muted
#dcefeblavender
#10231fblack
Muted foreground
#4c5d59darkslategray
#a2b3b0darkgray
Accent
#c19bcaplum
#c19bcaplum
Accent foreground
#1e1221black
#1e1221black
Destructive
#7b2204maroon
#f64c13orangered
Destructive foreground
#fcc7b5peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cac19btan
#cac19btan

Contrast

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

Light mode
Text on background18.82:1AAA
Text on card19.00:1AAA
Primary button9.20:1AAA
Secondary button9.21:1AAA
Muted text5.82:1AA
Accent7.55:1AAA
Destructive6.73:1AA
Dark mode
Text on background19.56:1AAA
Text on card19.55:1AAA
Primary button9.20:1AAA
Secondary button9.21:1AAA
Muted text7.51:1AAA
Accent7.55:1AAA
Destructive3.51: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 95.054);
  --foreground: oklch(0.166 0.026 97.885);
  --muted: oklch(0.937 0.02 182.593);
  --muted-foreground: oklch(0.462 0.021 181.862);
  --popover: oklch(0.994 0.002 95.054);
  --popover-foreground: oklch(0.166 0.026 97.885);
  --card: oklch(0.987 0.003 95.073);
  --card-foreground: oklch(0.148 0.023 99.313);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.808 0.052 95.645);
  --primary-foreground: oklch(0.236 0.023 95.784);
  --secondary: oklch(0.803 0.052 181.307);
  --secondary-foreground: oklch(0.234 0.022 180.2);
  --accent: oklch(0.739 0.079 319.465);
  --accent-foreground: oklch(0.205 0.036 319.444);
  --destructive: oklch(0.392 0.128 36.538);
  --destructive-foreground: oklch(0.872 0.066 39.238);
  --ring: oklch(0.808 0.052 95.645);
  --chart-1: oklch(0.808 0.052 95.645);
  --chart-2: oklch(0.803 0.052 181.307);
  --chart-3: oklch(0.739 0.079 319.465);
  --chart-4: oklch(0.823 0.046 181.551);
  --chart-5: oklch(0.812 0.057 95.679);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.01 97.6);
  --foreground: oklch(0.994 0.002 95.052);
  --muted: oklch(0.238 0.025 179.745);
  --muted-foreground: oklch(0.754 0.019 182.472);
  --popover: oklch(0.14 0.01 97.6);
  --popover-foreground: oklch(0.994 0.002 95.052);
  --card: oklch(0.154 0.011 96.363);
  --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.808 0.052 95.645);
  --primary-foreground: oklch(0.236 0.023 95.784);
  --secondary: oklch(0.803 0.052 181.307);
  --secondary-foreground: oklch(0.234 0.022 180.2);
  --accent: oklch(0.739 0.079 319.465);
  --accent-foreground: oklch(0.205 0.036 319.444);
  --destructive: oklch(0.653 0.215 36.12);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.808 0.052 95.645);
  --chart-1: oklch(0.808 0.052 95.645);
  --chart-2: oklch(0.803 0.052 181.307);
  --chart-3: oklch(0.739 0.079 319.465);
  --chart-4: oklch(0.823 0.046 181.551);
  --chart-5: oklch(0.812 0.057 95.679);
}