Bad for shadcn/ui

Bad is a shadcn/ui theme built around a near-white primary color (#fbfdfe) with near-white accents (#fbfcfe). The light mode uses a neutral background (#fbfdfe). Dark mode keeps the near-white primary (#fbfdfe) on a neutral background (#010304).

Color palette

TokenLightDark
Background
#fbfdfewhite
#010304black
Foreground
#010304black
#f4f9famintcream
Card
#fbfdfewhite
#010304black
Card foreground
#010304black
#f4f9famintcream
Popover
#fbfdfewhite
#010304black
Popover foreground
#010304black
#f4f9famintcream
Primary
#fbfdfewhite
#fbfdfewhite
Primary foreground
#193a48darkslategray
#193a48darkslategray
Secondary
#fbfefdwhite
#fbfefdwhite
Secondary foreground
#19483edarkslategray
#19483edarkslategray
Muted
#d5ebe7gainsboro
#142a25black
Muted foreground
#616161dimgray
#9e9e9edarkgray
Accent
#fbfcfewhite
#fbfcfewhite
Accent foreground
#344793darkslateblue
#344793darkslateblue
Destructive
#9b1503darkred
#fb3c23orangered
Destructive foreground
#fed7d2bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fbfdfewhite
#fbfdfewhite

Contrast

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

Light mode
Text on background20.25:1AAA
Text on card20.25:1AAA
Primary button11.82:1AAA
Secondary button10.14:1AAA
Muted text4.99:1AA
Accent8.27:1AAA
Destructive6.34:1AA
Dark mode
Text on background19.45:1AAA
Text on card19.45:1AAA
Primary button11.82:1AAA
Secondary button10.14:1AAA
Muted text5.67:1AA
Accent8.27:1AAA
Destructive3.64: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.993 0.002 225.006);
  --foreground: oklch(0.094 0.01 219.227);
  --muted: oklch(0.924 0.024 182.462);
  --muted-foreground: oklch(0.492 0 180);
  --popover: oklch(0.993 0.002 225.006);
  --popover-foreground: oklch(0.094 0.01 219.227);
  --card: oklch(0.993 0.002 225.006);
  --card-foreground: oklch(0.094 0.01 219.227);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.993 0.002 225.006);
  --primary-foreground: oklch(0.33 0.045 228.428);
  --secondary: oklch(0.994 0.003 183.111);
  --secondary-foreground: oklch(0.366 0.053 177.824);
  --accent: oklch(0.99 0.003 275.002);
  --accent-foreground: oklch(0.425 0.127 269.71);
  --destructive: oklch(0.442 0.169 31.009);
  --destructive-foreground: oklch(0.911 0.044 26.839);
  --ring: oklch(0.993 0.002 225.006);
  --chart-1: oklch(0.993 0.002 225.006);
  --chart-2: oklch(0.994 0.003 183.111);
  --chart-3: oklch(0.99 0.003 275.002);
  --chart-4: oklch(1.012 0.005 3.327);
  --chart-5: oklch(0.993 0.002 225.007);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.093 0.008 220.366);
  --foreground: oklch(0.978 0.005 225.04);
  --muted: oklch(0.263 0.03 179.541);
  --muted-foreground: oklch(0.7 0 180);
  --popover: oklch(0.093 0.008 220.366);
  --popover-foreground: oklch(0.978 0.005 225.04);
  --card: oklch(0.093 0.008 220.366);
  --card-foreground: oklch(0.978 0.005 225.04);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.993 0.002 225.006);
  --primary-foreground: oklch(0.33 0.045 228.428);
  --secondary: oklch(0.994 0.003 183.111);
  --secondary-foreground: oklch(0.366 0.053 177.824);
  --accent: oklch(0.99 0.003 275.002);
  --accent-foreground: oklch(0.425 0.127 269.71);
  --destructive: oklch(0.646 0.229 31.039);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.993 0.002 225.006);
  --chart-1: oklch(0.993 0.002 225.006);
  --chart-2: oklch(0.994 0.003 183.111);
  --chart-3: oklch(0.99 0.003 275.002);
  --chart-4: oklch(1.012 0.005 3.327);
  --chart-5: oklch(0.993 0.002 225.007);
}