Bargain for shadcn/ui

Bargain is a shadcn/ui theme built around a neutral gray primary color (#b0b1b5) with neutral gray accents (#b5b4b0). The light mode uses a neutral background (#f8f9fc). Dark mode keeps the neutral gray primary (#b0b1b5) on a neutral background (#030407).

Color palette

TokenLightDark
Background
#f8f9fcghostwhite
#030407black
Foreground
#010309black
#fcfcfdwhite
Card
#f8f9fcghostwhite
#030407black
Card foreground
#010309black
#fcfcfdwhite
Popover
#f8f9fcghostwhite
#030407black
Popover foreground
#010309black
#fcfcfdwhite
Primary
#b0b1b5darkgray
#b0b1b5darkgray
Primary foreground
#19191ablack
#19191ablack
Secondary
#b5b4b0darkgray
#b5b4b0darkgray
Secondary foreground
#1a1a19black
#1a1a19black
Muted
#f2f0e8linen
#17150dblack
Muted foreground
#4f4d45darkslategray
#bab8b0silver
Accent
#b5b4b0darkgray
#b5b4b0darkgray
Accent foreground
#1a1a19black
#1a1a19black
Destructive
#c84904chocolate
#eb5505orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b0b1b5darkgray
#b0b1b5darkgray

Contrast

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

Light mode
Text on background19.56:1AAA
Text on card19.56:1AAA
Primary button8.22:1AAA
Secondary button8.37:1AAA
Muted text7.42:1AAA
Accent8.37:1AAA
Destructive4.77:1AA
Dark mode
Text on background19.96:1AAA
Text on card19.96:1AAA
Primary button8.22:1AAA
Secondary button8.37:1AAA
Muted text9.21:1AAA
Accent8.37:1AAA
Destructive3.59:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.004 272.614);
  --foreground: oklch(0.099 0.02 262.323);
  --muted: oklch(0.955 0.011 92.766);
  --muted-foreground: oklch(0.419 0.013 92.936);
  --popover: oklch(0.982 0.004 272.614);
  --popover-foreground: oklch(0.099 0.02 262.323);
  --card: oklch(0.982 0.004 272.614);
  --card-foreground: oklch(0.099 0.02 262.323);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.761 0.005 272.587);
  --primary-foreground: oklch(0.214 0.002 272.542);
  --secondary: oklch(0.769 0.005 92.722);
  --secondary-foreground: oklch(0.217 0.002 92.76);
  --accent: oklch(0.769 0.005 92.722);
  --accent-foreground: oklch(0.217 0.002 92.76);
  --destructive: oklch(0.572 0.174 41.028);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.761 0.005 272.587);
  --chart-1: oklch(0.761 0.005 272.587);
  --chart-2: oklch(0.769 0.005 92.722);
  --chart-3: oklch(0.769 0.005 92.722);
  --chart-4: oklch(0.793 0.005 92.713);
  --chart-5: oklch(0.758 0.01 272.513);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.109 0.009 268.976);
  --foreground: oklch(0.991 0.001 272.644);
  --muted: oklch(0.194 0.016 93.165);
  --muted-foreground: oklch(0.782 0.011 92.796);
  --popover: oklch(0.109 0.009 268.976);
  --popover-foreground: oklch(0.991 0.001 272.644);
  --card: oklch(0.109 0.009 268.976);
  --card-foreground: oklch(0.991 0.001 272.644);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.761 0.005 272.587);
  --primary-foreground: oklch(0.214 0.002 272.542);
  --secondary: oklch(0.769 0.005 92.722);
  --secondary-foreground: oklch(0.217 0.002 92.76);
  --accent: oklch(0.769 0.005 92.722);
  --accent-foreground: oklch(0.217 0.002 92.76);
  --destructive: oklch(0.644 0.198 40.656);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.761 0.005 272.587);
  --chart-1: oklch(0.761 0.005 272.587);
  --chart-2: oklch(0.769 0.005 92.722);
  --chart-3: oklch(0.769 0.005 92.722);
  --chart-4: oklch(0.793 0.005 92.713);
  --chart-5: oklch(0.758 0.01 272.513);
}