Pastel for shadcn/ui

Pastel is a shadcn/ui theme built around a yellow primary color (#8d7b16) with purple accents (#7b168d). The light mode uses a neutral background (#fdfdfc). Dark mode keeps the yellow primary (#8d7b16) on a neutral background (#040301).

Color palette

TokenLightDark
Background
#fdfdfcwhite
#040301black
Foreground
#000000black
#fdfdfcwhite
Card
#fcfbf8snow
#070703black
Card foreground
#000000black
#ffffffwhite
Popover
#fdfdfcwhite
#040301black
Popover foreground
#000000black
#fdfdfcwhite
Primary
#8d7b16olive
#8d7b16olive
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#168d7bteal
#168d7bteal
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e0e6e5gainsboro
#191f1eblack
Muted foreground
#535f5edimgray
#a0acaadarkgray
Accent
#7b168dpurple
#7b168dpurple
Accent foreground
#f5dcf9lavender
#f5dcf9lavender
Destructive
#961108darkred
#f54538tomato
Destructive foreground
#fdd6d3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8d7b16olive
#8d7b16olive

Contrast

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

Light mode
Text on background20.64:1AAA
Text on card20.30:1AAA
Primary button4.20:1AA Large
Secondary button4.08:1AA Large
Muted text5.24:1AA
Accent7.02:1AAA
Destructive6.59:1AA
Dark mode
Text on background20.23:1AAA
Text on card20.19:1AAA
Primary button4.20:1AA Large
Secondary button4.08:1AA Large
Muted text7.13:1AAA
Accent7.02:1AAA
Destructive3.63: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 98.346);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.92 0.007 186.409);
  --muted-foreground: oklch(0.476 0.016 185.738);
  --popover: oklch(0.994 0.002 98.346);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.004 98.375);
  --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.583 0.114 98.268);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.579 0.101 179.193);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.432 0.189 320.839);
  --accent-foreground: oklch(0.923 0.048 321.176);
  --destructive: oklch(0.431 0.166 29.743);
  --destructive-foreground: oklch(0.908 0.043 22.809);
  --ring: oklch(0.583 0.114 98.268);
  --chart-1: oklch(0.583 0.114 98.268);
  --chart-2: oklch(0.579 0.101 179.193);
  --chart-3: oklch(0.432 0.189 320.839);
  --chart-4: oklch(0.618 0.108 179.11);
  --chart-5: oklch(0.59 0.116 98.094);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.099 0.01 101.344);
  --foreground: oklch(0.993 0.001 98.332);
  --muted: oklch(0.233 0.009 185.562);
  --muted-foreground: oklch(0.734 0.014 186.096);
  --popover: oklch(0.099 0.01 101.344);
  --popover-foreground: oklch(0.993 0.001 98.332);
  --card: oklch(0.125 0.013 101.344);
  --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.583 0.114 98.268);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.579 0.101 179.193);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.432 0.189 320.839);
  --accent-foreground: oklch(0.923 0.048 321.176);
  --destructive: oklch(0.646 0.214 28.64);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.583 0.114 98.268);
  --chart-1: oklch(0.583 0.114 98.268);
  --chart-2: oklch(0.579 0.101 179.193);
  --chart-3: oklch(0.432 0.189 320.839);
  --chart-4: oklch(0.618 0.108 179.11);
  --chart-5: oklch(0.59 0.116 98.094);
}