Sparerib for shadcn/ui

Sparerib is a shadcn/ui theme built around a muted deep red primary color (#2c2020) with muted light red accents (#eae1e1). The light mode uses a neutral background (#fefbfb). Dark mode keeps the muted deep red primary (#2c2020) on a red-tinted background (#0e0606).

Color palette

TokenLightDark
Background
#fefbfbsnow
#0e0606black
Foreground
#0c0303black
#fdfbfbsnow
Card
#fefbfbsnow
#0e0606black
Card foreground
#0c0303black
#fdfbfbsnow
Popover
#fefbfbsnow
#0e0606black
Popover foreground
#0c0303black
#fdfbfbsnow
Primary
#2c2020black
#2c2020black
Primary foreground
#c9b5b5silver
#c9b5b5silver
Secondary
#eae1e1gainsboro
#2c2525darkslategray
Secondary foreground
#5a3f3fdarkolivegreen
#c7bcbcsilver
Muted
#e8e3e3gainsboro
#1c1717black
Muted foreground
#6d5555dimgray
#aa9292rosybrown
Accent
#eae1e1gainsboro
#2c2525darkslategray
Accent foreground
#5a3f3fdarkolivegreen
#c7bcbcsilver
Destructive
#6f0d0cmaroon
#d41916firebrick
Destructive foreground
#f7b6b5lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2c2020black
#2c2020black

Contrast

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

Light mode
Text on background19.81:1AAA
Text on card19.81:1AAA
Primary button8.04:1AAA
Secondary button7.37:1AAA
Muted text5.36:1AA
Accent7.37:1AAA
Destructive7.08:1AAA
Dark mode
Text on background19.44:1AAA
Text on card19.44:1AAA
Primary button8.04:1AAA
Secondary button8.09:1AAA
Muted text6.11:1AA
Accent8.09:1AAA
Destructive5.29:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 17.208);
  --foreground: oklch(0.118 0.023 21.148);
  --muted: oklch(0.92 0.006 17.258);
  --muted-foreground: oklch(0.474 0.031 18.301);
  --popover: oklch(0.99 0.003 17.208);
  --popover-foreground: oklch(0.118 0.023 21.148);
  --card: oklch(0.99 0.003 17.208);
  --card-foreground: oklch(0.118 0.023 21.148);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.259 0.019 18.457);
  --primary-foreground: oklch(0.791 0.023 17.658);
  --secondary: oklch(0.917 0.01 17.339);
  --secondary-foreground: oklch(0.398 0.039 18.93);
  --accent: oklch(0.917 0.01 17.339);
  --accent-foreground: oklch(0.398 0.039 18.93);
  --destructive: oklch(0.348 0.131 27.986);
  --destructive-foreground: oklch(0.837 0.076 19.906);
  --ring: oklch(0.259 0.019 18.457);
  --chart-1: oklch(0.259 0.019 18.457);
  --chart-2: oklch(0.917 0.01 17.339);
  --chart-3: oklch(0.917 0.01 17.339);
  --chart-4: oklch(0.942 0.007 17.28);
  --chart-5: oklch(0.257 0.023 18.749);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.136 0.017 19.524);
  --foreground: oklch(0.991 0.002 17.192);
  --muted: oklch(0.211 0.008 17.822);
  --muted-foreground: oklch(0.682 0.028 17.856);
  --popover: oklch(0.136 0.017 19.524);
  --popover-foreground: oklch(0.991 0.002 17.192);
  --card: oklch(0.136 0.017 19.524);
  --card-foreground: oklch(0.991 0.002 17.192);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.259 0.019 18.457);
  --primary-foreground: oklch(0.791 0.023 17.658);
  --secondary: oklch(0.273 0.011 17.849);
  --secondary-foreground: oklch(0.805 0.012 17.416);
  --accent: oklch(0.273 0.011 17.849);
  --accent-foreground: oklch(0.805 0.012 17.416);
  --destructive: oklch(0.555 0.216 28.568);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.259 0.019 18.457);
  --chart-1: oklch(0.259 0.019 18.457);
  --chart-2: oklch(0.273 0.011 17.849);
  --chart-3: oklch(0.273 0.011 17.849);
  --chart-4: oklch(0.303 0.013 17.882);
  --chart-5: oklch(0.257 0.023 18.749);
}