Bag for shadcn/ui

Bag is a shadcn/ui theme built around an indigo primary color (#4d3bab) with violet accents (#853bab). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the indigo primary (#4d3bab) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#000000black
Foreground
#030208black
#ffffffwhite
Card
#fbfbfeghostwhite
#000000black
Card foreground
#030208black
#ffffffwhite
Popover
#fbfbfeghostwhite
#000000black
Popover foreground
#030208black
#ffffffwhite
Primary
#4d3babrebeccapurple
#4d3babrebeccapurple
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#3b60absteelblue
#3b60absteelblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d1d6e0gainsboro
#1f242edarkslategray
Muted foreground
#4e576adimgray
#959fb1darkgray
Accent
#853babrebeccapurple
#853babrebeccapurple
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#e45401orangered
#fe6106orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4d3babrebeccapurple
#4d3babrebeccapurple

Contrast

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

Light mode
Text on background20.00:1AAA
Text on card20.00:1AAA
Primary button8.32:1AAA
Secondary button6.09:1AA
Muted text4.99:1AA
Accent6.54:1AA
Destructive3.75:1AA Large
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button8.32:1AAA
Secondary button6.09:1AA
Muted text5.84:1AA
Accent6.54:1AA
Destructive6.91:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.004 293.987);
  --foreground: oklch(0.098 0.02 292.626);
  --muted: oklch(0.876 0.014 264.493);
  --muted-foreground: oklch(0.457 0.032 264.183);
  --popover: oklch(0.989 0.004 293.987);
  --popover-foreground: oklch(0.098 0.02 292.626);
  --card: oklch(0.989 0.004 293.987);
  --card-foreground: oklch(0.098 0.02 292.626);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.44 0.171 284.509);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.5 0.127 262.676);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.502 0.179 312.408);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.633 0.193 41.421);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.44 0.171 284.509);
  --chart-1: oklch(0.44 0.171 284.509);
  --chart-2: oklch(0.5 0.127 262.676);
  --chart-3: oklch(0.502 0.179 312.408);
  --chart-4: oklch(0.523 0.134 262.662);
  --chart-5: oklch(0.436 0.18 283.625);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.259 0.02 264.147);
  --muted-foreground: oklch(0.7 0.029 264.37);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.44 0.171 284.509);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.5 0.127 262.676);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.502 0.179 312.408);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.688 0.206 41.824);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.44 0.171 284.509);
  --chart-1: oklch(0.44 0.171 284.509);
  --chart-2: oklch(0.5 0.127 262.676);
  --chart-3: oklch(0.502 0.179 312.408);
  --chart-4: oklch(0.523 0.134 262.662);
  --chart-5: oklch(0.436 0.18 283.625);
}