Pastel for shadcn/ui

Pastel is a shadcn/ui theme built around a vivid deep violet primary color (#290038) with vivid deep purple accents (#38002b). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the vivid deep violet primary (#290038) on a violet-tinted background (#09050b).

Color palette

TokenLightDark
Background
#fdfbfewhite
#09050bblack
Foreground
#070208black
#fdfcfdwhite
Card
#fdfbfewhite
#09050bblack
Card foreground
#070208black
#fdfcfdwhite
Popover
#fdfbfewhite
#09050bblack
Popover foreground
#070208black
#fdfcfdwhite
Primary
#290038midnightblue
#290038midnightblue
Primary foreground
#d76cfeviolet
#d76cfeviolet
Secondary
#0d0038black
#0d0038black
Secondary foreground
#dcd1fflavender
#dcd1fflavender
Muted
#e6e3f3lavender
#100c1cblack
Muted foreground
#5e5874dimgray
#918ba7lightslategray
Accent
#38002bblack
#38002bblack
Accent foreground
#fe6cdcviolet
#fe6cdcviolet
Destructive
#c01502firebrick
#fd2e17orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#290038midnightblue
#290038midnightblue

Contrast

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

Light mode
Text on background19.98:1AAA
Text on card19.98:1AAA
Primary button6.47:1AA
Secondary button13.58:1AAA
Muted text5.31:1AA
Accent6.97:1AA
Destructive6.27:1AA
Dark mode
Text on background19.79:1AAA
Text on card19.79:1AAA
Primary button6.47:1AA
Secondary button13.58:1AAA
Muted text5.89:1AA
Accent6.97:1AA
Destructive3.77: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.991 0.004 317.179);
  --foreground: oklch(0.104 0.026 319.347);
  --muted: oklch(0.922 0.022 296.654);
  --muted-foreground: oklch(0.477 0.046 295.297);
  --popover: oklch(0.991 0.004 317.179);
  --popover-foreground: oklch(0.104 0.026 319.347);
  --card: oklch(0.991 0.004 317.179);
  --card-foreground: oklch(0.104 0.026 319.347);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.211 0.103 314.741);
  --primary-foreground: oklch(0.714 0.224 316.105);
  --secondary: oklch(0.169 0.1 281.71);
  --secondary-foreground: oklch(0.885 0.063 295.782);
  --accent: oklch(0.23 0.099 340.117);
  --accent-foreground: oklch(0.746 0.216 337.616);
  --destructive: oklch(0.514 0.202 30.463);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.211 0.103 314.741);
  --chart-1: oklch(0.211 0.103 314.741);
  --chart-2: oklch(0.169 0.1 281.71);
  --chart-3: oklch(0.23 0.099 340.117);
  --chart-4: oklch(0.195 0.117 279.432);
  --chart-5: oklch(0.211 0.106 314.658);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.019 318.483);
  --foreground: oklch(0.992 0.001 317.187);
  --muted: oklch(0.17 0.033 293.334);
  --muted-foreground: oklch(0.651 0.043 295.886);
  --popover: oklch(0.124 0.019 318.483);
  --popover-foreground: oklch(0.992 0.001 317.187);
  --card: oklch(0.124 0.019 318.483);
  --card-foreground: oklch(0.992 0.001 317.187);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.211 0.103 314.741);
  --primary-foreground: oklch(0.714 0.224 316.105);
  --secondary: oklch(0.169 0.1 281.71);
  --secondary-foreground: oklch(0.885 0.063 295.782);
  --accent: oklch(0.23 0.099 340.117);
  --accent-foreground: oklch(0.746 0.216 337.616);
  --destructive: oklch(0.64 0.241 30.51);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.211 0.103 314.741);
  --chart-1: oklch(0.211 0.103 314.741);
  --chart-2: oklch(0.169 0.1 281.71);
  --chart-3: oklch(0.23 0.099 340.117);
  --chart-4: oklch(0.195 0.117 279.432);
  --chart-5: oklch(0.211 0.106 314.658);
}