Previous for shadcn/ui

Previous is a shadcn/ui theme built around a muted deep purple primary color (#5f3556) with muted deep pink accents (#5f3541). The light mode uses a neutral background (#fdf7fb). Dark mode keeps the muted deep purple primary (#5f3556) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdf7fbsnow
#000000black
Foreground
#160312black
#fbf8fbsnow
Card
#fdf7fbsnow
#000000black
Card foreground
#160312black
#fbf8fbsnow
Popover
#fdf7fbsnow
#000000black
Popover foreground
#160312black
#fbf8fbsnow
Primary
#5f3556darkslategray
#5f3556darkslategray
Primary foreground
#ebdbe8gainsboro
#ebdbe8gainsboro
Secondary
#53355fdarkslateblue
#53355fdarkslateblue
Secondary foreground
#e6dbebgainsboro
#e6dbebgainsboro
Muted
#eae4eclavender
#19131bblack
Muted foreground
#5c5b5ddimgray
#a4a2a4darkgray
Accent
#5f3541darkslategray
#5f3541darkslategray
Accent foreground
#ebdbdfgainsboro
#ebdbdfgainsboro
Destructive
#b31809firebrick
#f43b2aorangered
Destructive foreground
#fef2f0seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5f3556darkslategray
#5f3556darkslategray

Contrast

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

Light mode
Text on background18.82:1AAA
Text on card18.82:1AAA
Primary button7.44:1AAA
Secondary button7.70:1AAA
Muted text5.40:1AA
Accent7.61:1AAA
Destructive6.27:1AA
Dark mode
Text on background19.92:1AAA
Text on card19.92:1AAA
Primary button7.44:1AAA
Secondary button7.70:1AAA
Muted text7.20:1AAA
Accent7.61:1AAA
Destructive3.82:1AA Large

CSS variables

Paste this into your globals.css to use Previous in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.008 332.747);
  --foreground: oklch(0.148 0.047 336.108);
  --muted: oklch(0.926 0.012 316.571);
  --muted-foreground: oklch(0.473 0.003 316.588);
  --popover: oklch(0.982 0.008 332.747);
  --popover-foreground: oklch(0.148 0.047 336.108);
  --card: oklch(0.982 0.008 332.747);
  --card-foreground: oklch(0.148 0.047 336.108);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.393 0.078 335.463);
  --primary-foreground: oklch(0.908 0.025 333.03);
  --secondary: oklch(0.382 0.08 315.915);
  --secondary-foreground: oklch(0.905 0.025 316.527);
  --accent: oklch(0.385 0.063 2.279);
  --accent-foreground: oklch(0.905 0.019 358.305);
  --destructive: oklch(0.491 0.189 30.091);
  --destructive-foreground: oklch(0.97 0.014 23.723);
  --ring: oklch(0.393 0.078 335.463);
  --chart-1: oklch(0.393 0.078 335.463);
  --chart-2: oklch(0.382 0.08 315.915);
  --chart-3: oklch(0.385 0.063 2.279);
  --chart-4: oklch(0.408 0.087 315.901);
  --chart-5: oklch(0.393 0.086 335.735);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.983 0.005 332.69);
  --muted: oklch(0.197 0.018 316.347);
  --muted-foreground: oklch(0.715 0.003 316.596);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.983 0.005 332.69);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.983 0.005 332.69);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.393 0.078 335.463);
  --primary-foreground: oklch(0.908 0.025 333.03);
  --secondary: oklch(0.382 0.08 315.915);
  --secondary-foreground: oklch(0.905 0.025 316.527);
  --accent: oklch(0.385 0.063 2.279);
  --accent-foreground: oklch(0.905 0.019 358.305);
  --destructive: oklch(0.634 0.223 29.773);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.393 0.078 335.463);
  --chart-1: oklch(0.393 0.078 335.463);
  --chart-2: oklch(0.382 0.08 315.915);
  --chart-3: oklch(0.385 0.063 2.279);
  --chart-4: oklch(0.408 0.087 315.901);
  --chart-5: oklch(0.393 0.086 335.735);
}