Tough for shadcn/ui

Tough is a shadcn/ui theme built around a muted deep blue primary color (#1c1c22) with muted deep violet accents (#1e1c22). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the muted deep blue primary (#1c1c22) on a blue-tinted background (#07070e).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#07070eblack
Foreground
#010105black
#fcfcfdwhite
Card
#fbfbfeghostwhite
#07070eblack
Card foreground
#010105black
#fcfcfdwhite
Popover
#fbfbfeghostwhite
#07070eblack
Popover foreground
#010105black
#fcfcfdwhite
Primary
#1c1c22black
#1c1c22black
Primary foreground
#b0b2bfsilver
#b0b2bfsilver
Secondary
#1c1f22black
#1c1f22black
Secondary foreground
#b0b9bfsilver
#b0b9bfsilver
Muted
#ecf0f3whitesmoke
#0c1013black
Muted foreground
#5d6265dimgray
#9a9fa2darkgray
Accent
#1e1c22black
#1e1c22black
Accent foreground
#b6b0bfsilver
#b6b0bfsilver
Destructive
#8a150adarkred
#f04c3dtomato
Destructive foreground
#fbcfcbpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1c1c22black
#1c1c22black

Contrast

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

Light mode
Text on background20.22:1AAA
Text on card20.22:1AAA
Primary button8.04:1AAA
Secondary button8.30:1AAA
Muted text5.40:1AA
Accent8.02:1AAA
Destructive6.81:1AA
Dark mode
Text on background19.56:1AAA
Text on card19.56:1AAA
Primary button8.04:1AAA
Secondary button8.30:1AAA
Muted text7.14:1AAA
Accent8.02:1AAA
Destructive3.61:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 281.236);
  --foreground: oklch(0.072 0.021 271.023);
  --muted: oklch(0.954 0.006 236.528);
  --muted-foreground: oklch(0.492 0.008 236.661);
  --popover: oklch(0.99 0.003 281.236);
  --popover-foreground: oklch(0.072 0.021 271.023);
  --card: oklch(0.99 0.003 281.236);
  --card-foreground: oklch(0.072 0.021 271.023);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.229 0.011 280.498);
  --primary-foreground: oklch(0.766 0.018 280.893);
  --secondary: oklch(0.237 0.007 236.888);
  --secondary-foreground: oklch(0.781 0.013 236.669);
  --accent: oklch(0.23 0.012 303.586);
  --accent-foreground: oklch(0.768 0.021 303.953);
  --destructive: oklch(0.408 0.152 30.049);
  --destructive-foreground: oklch(0.891 0.05 24.223);
  --ring: oklch(0.229 0.011 280.498);
  --chart-1: oklch(0.229 0.011 280.498);
  --chart-2: oklch(0.237 0.007 236.888);
  --chart-3: oklch(0.23 0.012 303.586);
  --chart-4: oklch(0.269 0.009 236.92);
  --chart-5: oklch(0.226 0.014 280.227);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.134 0.014 278.451);
  --foreground: oklch(0.991 0.001 281.269);
  --muted: oklch(0.17 0.009 237.302);
  --muted-foreground: oklch(0.699 0.007 236.58);
  --popover: oklch(0.134 0.014 278.451);
  --popover-foreground: oklch(0.991 0.001 281.269);
  --card: oklch(0.134 0.014 278.451);
  --card-foreground: oklch(0.991 0.001 281.269);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.229 0.011 280.498);
  --primary-foreground: oklch(0.766 0.018 280.893);
  --secondary: oklch(0.237 0.007 236.888);
  --secondary-foreground: oklch(0.781 0.013 236.669);
  --accent: oklch(0.23 0.012 303.586);
  --accent-foreground: oklch(0.768 0.021 303.953);
  --destructive: oklch(0.646 0.204 29.081);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.229 0.011 280.498);
  --chart-1: oklch(0.229 0.011 280.498);
  --chart-2: oklch(0.237 0.007 236.888);
  --chart-3: oklch(0.23 0.012 303.586);
  --chart-4: oklch(0.269 0.009 236.92);
  --chart-5: oklch(0.226 0.014 280.227);
}