Simply Purple Sloth for shadcn/ui

Simply Purple Sloth is a shadcn/ui theme built around a violet primary color (#725bb3) with green accents (#9cb35b). The light mode uses a neutral background (#f8f7fd). Dark mode keeps the violet primary (#725bb3) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#f8f7fdghostwhite
#020104black
Foreground
#040208black
#ffffffwhite
Card
#f8f7fdghostwhite
#020104black
Card foreground
#040208black
#ffffffwhite
Popover
#f8f7fdghostwhite
#020104black
Popover foreground
#040208black
#ffffffwhite
Primary
#725bb3slateblue
#725bb3slateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#9cb35bdarkkhaki
#9cb35bdarkkhaki
Secondary foreground
#272d15black
#272d15black
Muted
#f0f2e8linen
#14170dblack
Muted foreground
#5d6250dimgray
#aaaf9ddarkgray
Accent
#9cb35bdarkkhaki
#9cb35bdarkkhaki
Accent foreground
#272d15black
#272d15black
Destructive
#aa3d0esaddlebrown
#ef733etomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e7e6ealavender
#1d1c22black
Input
#e7e6ealavender
#1d1c22black
Ring
#725bb3slateblue
#725bb3slateblue

Contrast

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

Light mode
Text on background19.36:1AAA
Text on card19.36:1AAA
Primary button5.43:1AA
Secondary button6.14:1AA
Muted text5.58:1AA
Accent6.14:1AA
Destructive6.23:1AA
Dark mode
Text on background20.80:1AAA
Text on card20.80:1AAA
Primary button5.43:1AA
Secondary button6.14:1AA
Muted text8.05:1AAA
Accent6.14:1AA
Destructive7.19:1AAA

CSS variables

Paste this into your globals.css to use Simply Purple Sloth in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.978 0.009 298.414);
  --foreground: oklch(0.097 0.023 298.408);
  --muted: oklch(0.957 0.014 118.822);
  --muted-foreground: oklch(0.487 0.028 119.588);
  --popover: oklch(0.978 0.009 298.414);
  --popover-foreground: oklch(0.097 0.023 298.408);
  --card: oklch(0.978 0.009 298.414);
  --card-foreground: oklch(0.097 0.023 298.408);
  --border: oklch(0.926 0.006 298.448);
  --input: oklch(0.926 0.006 298.448);
  --primary: oklch(0.536 0.135 293.597);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.731 0.118 121.693);
  --secondary-foreground: oklch(0.285 0.042 121.347);
  --accent: oklch(0.731 0.118 121.693);
  --accent-foreground: oklch(0.285 0.042 121.347);
  --destructive: oklch(0.507 0.153 39.618);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.536 0.135 293.597);
  --chart-1: oklch(0.536 0.135 293.597);
  --chart-2: oklch(0.731 0.118 121.693);
  --chart-3: oklch(0.731 0.118 121.693);
  --chart-4: oklch(0.748 0.112 121.391);
  --chart-5: oklch(0.53 0.146 293.055);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.079 0.016 298.43);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.198 0.02 120.395);
  --muted-foreground: oklch(0.744 0.026 119.169);
  --popover: oklch(0.079 0.016 298.43);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.079 0.016 298.43);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.229 0.012 297.652);
  --input: oklch(0.229 0.012 297.652);
  --primary: oklch(0.536 0.135 293.597);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.731 0.118 121.693);
  --secondary-foreground: oklch(0.285 0.042 121.347);
  --accent: oklch(0.731 0.118 121.693);
  --accent-foreground: oklch(0.285 0.042 121.347);
  --destructive: oklch(0.693 0.168 42.288);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.536 0.135 293.597);
  --chart-1: oklch(0.536 0.135 293.597);
  --chart-2: oklch(0.731 0.118 121.693);
  --chart-3: oklch(0.731 0.118 121.693);
  --chart-4: oklch(0.748 0.112 121.391);
  --chart-5: oklch(0.53 0.146 293.055);
}