Bad for shadcn/ui

Bad is a shadcn/ui theme built around a deep green primary color (#0b180c) with deep purple accents (#180b18). The light mode uses a neutral background (#fbfefb). Dark mode keeps the deep green primary (#0b180c) on a green-tinted background (#050a05).

Color palette

TokenLightDark
Background
#fbfefbwhite
#050a05black
Foreground
#000000black
#f9fbf9mintcream
Card
#fbfefbwhite
#050a05black
Card foreground
#000000black
#f9fbf9mintcream
Popover
#fbfefbwhite
#050a05black
Popover foreground
#000000black
#f9fbf9mintcream
Primary
#0b180cblack
#0b180cblack
Primary foreground
#8dc98edarkseagreen
#8dc98edarkseagreen
Secondary
#180b18black
#180b18black
Secondary foreground
#c98dc8plum
#c98dc8plum
Muted
#e8e3e8gainsboro
#1c171cblack
Muted foreground
#554455darkslategray
#bbaabbsilver
Accent
#180b18black
#180b18black
Accent foreground
#c98dc8plum
#c98dc8plum
Destructive
#923202saddlebrown
#e24e03orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0b180cblack
#0b180cblack

Contrast

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

Light mode
Text on background20.64:1AAA
Text on card20.64:1AAA
Primary button9.43:1AAA
Secondary button7.37:1AAA
Muted text7.07:1AAA
Accent7.37:1AAA
Destructive7.85:1AAA
Dark mode
Text on background19.18:1AAA
Text on card19.18:1AAA
Primary button9.43:1AAA
Secondary button7.37:1AAA
Muted text8.06:1AAA
Accent7.37:1AAA
Destructive3.94:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 146.018);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.921 0.009 326.129);
  --muted-foreground: oklch(0.411 0.035 326.713);
  --popover: oklch(0.994 0.004 146.018);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.994 0.004 146.018);
  --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.194 0.031 144.634);
  --primary-foreground: oklch(0.78 0.104 144.885);
  --secondary: oklch(0.176 0.032 327.411);
  --secondary-foreground: oklch(0.721 0.108 327.18);
  --accent: oklch(0.176 0.032 327.411);
  --accent-foreground: oklch(0.721 0.108 327.18);
  --destructive: oklch(0.452 0.138 40.701);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.194 0.031 144.634);
  --chart-1: oklch(0.194 0.031 144.634);
  --chart-2: oklch(0.176 0.032 327.411);
  --chart-3: oklch(0.176 0.032 327.411);
  --chart-4: oklch(0.209 0.044 327.588);
  --chart-5: oklch(0.195 0.033 144.527);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.136 0.015 145.219);
  --foreground: oklch(0.985 0.002 146.034);
  --muted: oklch(0.213 0.012 326.515);
  --muted-foreground: oklch(0.758 0.03 326.368);
  --popover: oklch(0.136 0.015 145.219);
  --popover-foreground: oklch(0.985 0.002 146.034);
  --card: oklch(0.136 0.015 145.219);
  --card-foreground: oklch(0.985 0.002 146.034);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.194 0.031 144.634);
  --primary-foreground: oklch(0.78 0.104 144.885);
  --secondary: oklch(0.176 0.032 327.411);
  --secondary-foreground: oklch(0.721 0.108 327.18);
  --accent: oklch(0.176 0.032 327.411);
  --accent-foreground: oklch(0.721 0.108 327.18);
  --destructive: oklch(0.621 0.196 39.484);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.194 0.031 144.634);
  --chart-1: oklch(0.194 0.031 144.634);
  --chart-2: oklch(0.176 0.032 327.411);
  --chart-3: oklch(0.176 0.032 327.411);
  --chart-4: oklch(0.209 0.044 327.588);
  --chart-5: oklch(0.195 0.033 144.527);
}