Stitch for shadcn/ui

Stitch is a shadcn/ui theme built around a deep blue primary color (#222d6d) with muted light blue accents (#b7bacd). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the deep blue primary (#222d6d) on a blue-tinted background (#04050b).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#04050bblack
Foreground
#040610black
#f9f9fbghostwhite
Card
#f7f8fdghostwhite
#05070fblack
Card foreground
#03050cblack
#fcfcfdwhite
Popover
#f7f8fdghostwhite
#05070fblack
Popover foreground
#03050cblack
#fcfcfdwhite
Primary
#222d6dmidnightblue
#222d6dmidnightblue
Primary foreground
#d0d5f0gainsboro
#d0d5f0gainsboro
Secondary
#cfd1d8lightgrey
#2d2d2fdarkslategray
Secondary foreground
#353741darkslategray
#c5c6c9silver
Muted
#dcdfeflavender
#101323black
Muted foreground
#5f6167dimgray
#9899a0darkgray
Accent
#b7bacdsilver
#3e4151darkslategray
Accent foreground
#212430darkslategray
#dcdee4gainsboro
Destructive
#d93f02orangered
#fd662btomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#222d6dmidnightblue
#222d6dmidnightblue

Contrast

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

Light mode
Text on background19.60:1AAA
Text on card19.15:1AAA
Primary button8.66:1AAA
Secondary button7.74:1AAA
Muted text4.66:1AA
Accent8.03:1AAA
Destructive4.49:1AA Large
Dark mode
Text on background19.34:1AAA
Text on card19.62:1AAA
Primary button8.66:1AAA
Secondary button8.06:1AAA
Muted text6.49:1AA
Accent7.51:1AAA
Destructive7.12:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.004 278.264);
  --foreground: oklch(0.127 0.023 272.356);
  --muted: oklch(0.906 0.022 277.956);
  --muted-foreground: oklch(0.493 0.011 277.992);
  --popover: oklch(0.979 0.007 278.208);
  --popover-foreground: oklch(0.115 0.02 271.897);
  --card: oklch(0.979 0.007 278.208);
  --card-foreground: oklch(0.115 0.02 271.897);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.329 0.11 271.48);
  --primary-foreground: oklch(0.879 0.038 277.662);
  --secondary: oklch(0.861 0.01 278.144);
  --secondary-foreground: oklch(0.337 0.018 277.505);
  --accent: oklch(0.792 0.027 277.809);
  --accent-foreground: oklch(0.262 0.024 276.846);
  --destructive: oklch(0.59 0.199 36.548);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.329 0.11 271.48);
  --chart-1: oklch(0.329 0.11 271.48);
  --chart-2: oklch(0.861 0.01 278.144);
  --chart-3: oklch(0.792 0.027 277.809);
  --chart-4: oklch(0.886 0.008 278.181);
  --chart-5: oklch(0.326 0.116 270.948);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.118 0.017 273.254);
  --foreground: oklch(0.983 0.002 278.289);
  --muted: oklch(0.192 0.033 275.267);
  --muted-foreground: oklch(0.683 0.01 278.104);
  --popover: oklch(0.13 0.019 273.704);
  --popover-foreground: oklch(0.992 0.001 278.303);
  --card: oklch(0.13 0.019 273.704);
  --card-foreground: oklch(0.992 0.001 278.303);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.329 0.11 271.48);
  --primary-foreground: oklch(0.879 0.038 277.662);
  --secondary: oklch(0.297 0.004 278.109);
  --secondary-foreground: oklch(0.826 0.004 278.248);
  --accent: oklch(0.379 0.027 277.172);
  --accent-foreground: oklch(0.9 0.009 278.168);
  --destructive: oklch(0.695 0.196 39.806);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.329 0.11 271.48);
  --chart-1: oklch(0.329 0.11 271.48);
  --chart-2: oklch(0.297 0.004 278.109);
  --chart-3: oklch(0.379 0.027 277.172);
  --chart-4: oklch(0.327 0.005 278.101);
  --chart-5: oklch(0.326 0.116 270.948);
}