Sweatshop for shadcn/ui

Sweatshop is a shadcn/ui theme built around a muted purple primary color (#9b7d9a) with muted teal accents (#7d9a9b). The light mode uses a neutral background (#fefbfe). Dark mode keeps the muted purple primary (#9b7d9a) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefbfewhite
#000000black
Foreground
#0c030cblack
#fbf9fbsnow
Card
#fefbfewhite
#000000black
Card foreground
#0c030cblack
#fbf9fbsnow
Popover
#fefbfewhite
#000000black
Popover foreground
#0c030cblack
#fbf9fbsnow
Primary
#9b7d9agray
#9b7d9agray
Primary foreground
#000000black
#000000black
Secondary
#9a9b7dgray
#9a9b7dgray
Secondary foreground
#000000black
#000000black
Muted
#e4e4d8gainsboro
#27271bblack
Muted foreground
#5d5d4bdarkolivegreen
#b3b4a2darkgray
Accent
#7d9a9blightslategray
#7d9a9blightslategray
Accent foreground
#000000black
#000000black
Destructive
#7e2207maroon
#f34612orangered
Destructive foreground
#fbcabbpeachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9b7d9agray
#9b7d9agray

Contrast

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

Light mode
Text on background19.78:1AAA
Text on card19.78:1AAA
Primary button5.81:1AA
Secondary button7.37:1AAA
Muted text5.23:1AA
Accent6.98:1AA
Destructive6.71:1AA
Dark mode
Text on background20.04:1AAA
Text on card20.04:1AAA
Primary button5.81:1AA
Secondary button7.37:1AAA
Muted text7.12:1AAA
Accent6.98:1AA
Destructive3.69:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 326.575);
  --foreground: oklch(0.124 0.031 328.216);
  --muted: oklch(0.916 0.017 108.275);
  --muted-foreground: oklch(0.474 0.029 109.018);
  --popover: oklch(0.991 0.004 326.575);
  --popover-foreground: oklch(0.124 0.031 328.216);
  --card: oklch(0.991 0.004 326.575);
  --card-foreground: oklch(0.124 0.031 328.216);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.629 0.055 327.267);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.681 0.042 109.042);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.665 0.032 198.997);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.398 0.131 35.765);
  --destructive-foreground: oklch(0.879 0.06 37.592);
  --ring: oklch(0.629 0.055 327.267);
  --chart-1: oklch(0.629 0.055 327.267);
  --chart-2: oklch(0.681 0.042 109.042);
  --chart-3: oklch(0.665 0.032 198.997);
  --chart-4: oklch(0.703 0.039 108.934);
  --chart-5: oklch(0.627 0.068 327.428);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.984 0.005 326.581);
  --muted: oklch(0.27 0.022 109.387);
  --muted-foreground: oklch(0.765 0.026 108.548);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.984 0.005 326.581);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.984 0.005 326.581);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.629 0.055 327.267);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.681 0.042 109.042);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.665 0.032 198.997);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.641 0.216 35.237);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.629 0.055 327.267);
  --chart-1: oklch(0.629 0.055 327.267);
  --chart-2: oklch(0.681 0.042 109.042);
  --chart-3: oklch(0.665 0.032 198.997);
  --chart-4: oklch(0.703 0.039 108.934);
  --chart-5: oklch(0.627 0.068 327.428);
}