Residue for shadcn/ui

Residue is a shadcn/ui theme built around a muted violet primary color (#8962a3) with muted green accents (#7ca362). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the muted violet primary (#8962a3) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfbfewhite
#000000black
Foreground
#000000black
#fdfcfdwhite
Card
#fbf6fdghostwhite
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#fbf6fdghostwhite
#030303black
Popover foreground
#000000black
#ffffffwhite
Primary
#8962a3lightslategray
#8962a3lightslategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#7ca362gray
#7ca362gray
Secondary foreground
#000000black
#000000black
Muted
#e2e8degainsboro
#1b2117black
Muted foreground
#494f45darkslategray
#b4bab0silver
Accent
#7ca362gray
#7ca362gray
Accent foreground
#000000black
#000000black
Destructive
#721808maroon
#ef3615orangered
Destructive foreground
#fabdb3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8962a3lightslategray
#8962a3lightslategray

Contrast

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

Light mode
Text on background20.36:1AAA
Text on card19.74:1AAA
Primary button4.86:1AA
Secondary button7.23:1AAA
Muted text6.76:1AA
Accent7.23:1AAA
Destructive7.00:1AAA
Dark mode
Text on background20.51:1AAA
Text on card20.67:1AAA
Primary button4.86:1AA
Secondary button7.23:1AAA
Muted text8.28:1AAA
Accent7.23:1AAA
Destructive4.03:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.005 312.32);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.924 0.015 132.48);
  --muted-foreground: oklch(0.419 0.019 132.7);
  --popover: oklch(0.98 0.01 312.281);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.98 0.01 312.281);
  --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.561 0.106 310.881);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.669 0.101 133.685);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.669 0.101 133.685);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.364 0.127 32.272);
  --destructive-foreground: oklch(0.851 0.072 30.006);
  --ring: oklch(0.561 0.106 310.881);
  --chart-1: oklch(0.561 0.106 310.881);
  --chart-2: oklch(0.669 0.101 133.685);
  --chart-3: oklch(0.669 0.101 133.685);
  --chart-4: oklch(0.69 0.094 133.535);
  --chart-5: oklch(0.557 0.118 310.677);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.002 312.34);
  --muted: oklch(0.238 0.021 133.054);
  --muted-foreground: oklch(0.782 0.016 132.513);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.561 0.106 310.881);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.669 0.101 133.685);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.669 0.101 133.685);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.62 0.224 32.043);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.561 0.106 310.881);
  --chart-1: oklch(0.561 0.106 310.881);
  --chart-2: oklch(0.669 0.101 133.685);
  --chart-3: oklch(0.669 0.101 133.685);
  --chart-4: oklch(0.69 0.094 133.535);
  --chart-5: oklch(0.557 0.118 310.677);
}