System for shadcn/ui

System is a shadcn/ui theme built around a muted purple primary color (#8a788c) with muted pink accents (#8c7884). The light mode uses a neutral background (#fcf7fd). Dark mode keeps the muted purple primary (#8a788c) on a neutral background (#030204).

Color palette

TokenLightDark
Background
#fcf7fdghostwhite
#030204black
Foreground
#000000black
#fbf8fbsnow
Card
#fbf3fcghostwhite
#070307black
Card foreground
#000000black
#fdfcfdwhite
Popover
#fbf3fcghostwhite
#070307black
Popover foreground
#000000black
#fdfcfdwhite
Primary
#8a788cgray
#8a788cgray
Primary foreground
#000000black
#000000black
Secondary
#80788cgray
#80788cgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#efebf5lavender
#0e0a14black
Muted foreground
#514e56darkslategray
#ada9b1darkgray
Accent
#8c7884gray
#8c7884gray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#ab1712firebrick
#ec4c46tomato
Destructive foreground
#fef2f1seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8a788cgray
#8a788cgray

Contrast

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

Light mode
Text on background19.87:1AAA
Text on card19.32:1AAA
Primary button5.15:1AA
Secondary button4.20:1AA Large
Muted text6.92:1AA
Accent4.08:1AA Large
Destructive6.71:1AA
Dark mode
Text on background19.67:1AAA
Text on card20.01:1AAA
Primary button5.15:1AA
Secondary button4.20:1AA Large
Muted text8.45:1AAA
Accent4.08:1AA Large
Destructive3.70:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.009 323.178);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.945 0.014 304.838);
  --muted-foreground: oklch(0.428 0.014 304.595);
  --popover: oklch(0.973 0.014 323.201);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.973 0.014 323.201);
  --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.596 0.037 323.413);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.587 0.032 304.301);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.595 0.03 342.144);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.475 0.181 28.764);
  --destructive-foreground: oklch(0.969 0.013 19.794);
  --ring: oklch(0.596 0.037 323.413);
  --chart-1: oklch(0.596 0.037 323.413);
  --chart-2: oklch(0.587 0.032 304.301);
  --chart-3: oklch(0.595 0.03 342.144);
  --chart-4: oklch(0.614 0.029 304.385);
  --chart-5: oklch(0.593 0.051 323.514);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.087 0.013 324.326);
  --foreground: oklch(0.983 0.005 323.157);
  --muted: oklch(0.157 0.022 303.061);
  --muted-foreground: oklch(0.741 0.012 304.818);
  --popover: oklch(0.11 0.017 324.326);
  --popover-foreground: oklch(0.992 0.002 323.146);
  --card: oklch(0.11 0.017 324.326);
  --card-foreground: oklch(0.992 0.002 323.146);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.596 0.037 323.413);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.587 0.032 304.301);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.595 0.03 342.144);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.639 0.197 26.346);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.596 0.037 323.413);
  --chart-1: oklch(0.596 0.037 323.413);
  --chart-2: oklch(0.587 0.032 304.301);
  --chart-3: oklch(0.595 0.03 342.144);
  --chart-4: oklch(0.614 0.029 304.385);
  --chart-5: oklch(0.593 0.051 323.514);
}