Bag for shadcn/ui

Bag is a shadcn/ui theme built around a deep green primary color (#1b5f3b) with deep teal accents (#1b5f5d). The light mode uses a neutral background (#fbfefc). Dark mode keeps the deep green primary (#1b5f3b) on a green-tinted background (#04100a).

Color palette

TokenLightDark
Background
#fbfefcwhite
#04100ablack
Foreground
#000000black
#fcfdfcwhite
Card
#f7fdfamintcream
#05140cblack
Card foreground
#000000black
#ffffffwhite
Popover
#f7fdfamintcream
#05140cblack
Popover foreground
#000000black
#ffffffwhite
Primary
#1b5f3bdarkslategray
#1b5f3bdarkslategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#1d5f1bdarkgreen
#1d5f1bdarkgreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dfe7dfgainsboro
#182018black
Muted foreground
#606c60dimgray
#939f93darkseagreen
Accent
#1b5f5ddarkslategray
#1b5f5ddarkslategray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#ad2600firebrick
#ff3700orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1b5f3bdarkslategray
#1b5f3bdarkslategray

Contrast

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

Light mode
Text on background20.68:1AAA
Text on card20.36:1AAA
Primary button7.59:1AAA
Secondary button7.71:1AAA
Muted text4.36:1AA Large
Accent7.34:1AAA
Destructive6.86:1AA
Dark mode
Text on background18.97:1AAA
Text on card18.83:1AAA
Primary button7.59:1AAA
Secondary button7.71:1AAA
Muted text6.05:1AA
Accent7.34:1AAA
Destructive3.61:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 163.348);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.92 0.013 144.525);
  --muted-foreground: oklch(0.518 0.024 144.318);
  --popover: oklch(0.988 0.008 163.249);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.008 163.249);
  --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.435 0.091 155.765);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.43 0.121 142.649);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.445 0.066 191.811);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.489 0.176 33.886);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.435 0.091 155.765);
  --chart-1: oklch(0.435 0.091 155.765);
  --chart-2: oklch(0.43 0.121 142.649);
  --chart-3: oklch(0.445 0.066 191.811);
  --chart-4: oklch(0.467 0.133 142.629);
  --chart-5: oklch(0.439 0.095 155.382);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.159 0.024 161.376);
  --foreground: oklch(0.993 0.001 163.418);
  --muted: oklch(0.233 0.019 144.09);
  --muted-foreground: oklch(0.69 0.022 144.409);
  --popover: oklch(0.176 0.028 159.673);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.176 0.028 159.673);
  --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.435 0.091 155.765);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.43 0.121 142.649);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.445 0.066 191.811);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.649 0.238 33.182);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.435 0.091 155.765);
  --chart-1: oklch(0.435 0.091 155.765);
  --chart-2: oklch(0.43 0.121 142.649);
  --chart-3: oklch(0.445 0.066 191.811);
  --chart-4: oklch(0.467 0.133 142.629);
  --chart-5: oklch(0.439 0.095 155.382);
}