Baggy for shadcn/ui

Baggy is a shadcn/ui theme built around a purple primary color (#9d4baa) with green accents (#57aa4b). The light mode uses a neutral background (#fcf6fd). Dark mode keeps the purple primary (#9d4baa) on a neutral background (#070307).

Color palette

TokenLightDark
Background
#fcf6fdghostwhite
#070307black
Foreground
#040104black
#ffffffwhite
Card
#fcf6fdghostwhite
#070307black
Card foreground
#040104black
#ffffffwhite
Popover
#fcf6fdghostwhite
#070307black
Popover foreground
#040104black
#ffffffwhite
Primary
#9d4baadarkorchid
#9d4baadarkorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#57aa4bmediumseagreen
#57aa4bmediumseagreen
Secondary foreground
#0f1c0cblack
#0f1c0cblack
Muted
#f1f4f1whitesmoke
#0c0e0bblack
Muted foreground
#656765dimgray
#989a98darkgray
Accent
#57aa4bmediumseagreen
#57aa4bmediumseagreen
Accent foreground
#0f1c0cblack
#0f1c0cblack
Destructive
#b72801firebrick
#fe3c06orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9d4baadarkorchid
#9d4baadarkorchid

Contrast

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

Light mode
Text on background19.59:1AAA
Text on card19.59:1AAA
Primary button5.22:1AA
Secondary button6.10:1AA
Muted text5.14:1AA
Accent6.10:1AA
Destructive6.33:1AA
Dark mode
Text on background20.51:1AAA
Text on card20.51:1AAA
Primary button5.22:1AA
Secondary button6.10:1AA
Muted text6.83:1AA
Accent6.10:1AA
Destructive3.58:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.011 321.624);
  --foreground: oklch(0.083 0.025 323.904);
  --muted: oklch(0.964 0.005 141.577);
  --muted-foreground: oklch(0.512 0.004 141.571);
  --popover: oklch(0.981 0.011 321.624);
  --popover-foreground: oklch(0.083 0.025 323.904);
  --card: oklch(0.981 0.011 321.624);
  --card-foreground: oklch(0.083 0.025 323.904);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.553 0.165 322.143);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.664 0.155 141.082);
  --secondary-foreground: oklch(0.21 0.036 141.148);
  --accent: oklch(0.664 0.155 141.082);
  --accent-foreground: oklch(0.21 0.036 141.148);
  --destructive: oklch(0.508 0.183 33.817);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.553 0.165 322.143);
  --chart-1: oklch(0.553 0.165 322.143);
  --chart-2: oklch(0.664 0.155 141.082);
  --chart-3: oklch(0.664 0.155 141.082);
  --chart-4: oklch(0.691 0.157 141.083);
  --chart-5: oklch(0.554 0.175 322.138);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.02 323.095);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.161 0.008 141.447);
  --muted-foreground: oklch(0.684 0.004 141.578);
  --popover: oklch(0.108 0.02 323.095);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.108 0.02 323.095);
  --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.553 0.165 322.143);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.664 0.155 141.082);
  --secondary-foreground: oklch(0.21 0.036 141.148);
  --accent: oklch(0.664 0.155 141.082);
  --accent-foreground: oklch(0.21 0.036 141.148);
  --destructive: oklch(0.651 0.234 33.577);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.553 0.165 322.143);
  --chart-1: oklch(0.553 0.165 322.143);
  --chart-2: oklch(0.664 0.155 141.082);
  --chart-3: oklch(0.664 0.155 141.082);
  --chart-4: oklch(0.691 0.157 141.083);
  --chart-5: oklch(0.554 0.175 322.138);
}