Stomach for shadcn/ui

Stomach is a shadcn/ui theme built around a muted deep teal primary color (#2f5456) with muted light teal accents (#e9ecec). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep teal primary (#2f5456) on a teal-tinted background (#050a0b).

Color palette

TokenLightDark
Background
#ffffffwhite
#050a0bblack
Foreground
#010404black
#f8fbfbghostwhite
Card
#fcfcfcsnow
#060e0eblack
Card foreground
#000000black
#fcfdfdwhite
Popover
#fcfcfcsnow
#060e0eblack
Popover foreground
#000000black
#fcfdfdwhite
Primary
#2f5456darkslategray
#2f5456darkslategray
Primary foreground
#d1e5e6gainsboro
#d1e5e6gainsboro
Secondary
#e9ececlavender
#131616black
Secondary foreground
#4a5859darkslategray
#a9b2b2darkgray
Muted
#dfe2e2gainsboro
#1d2020black
Muted foreground
#3e5051darkslategray
#aec0c1silver
Accent
#e9ececlavender
#131616black
Accent foreground
#4a5859darkslategray
#a9b2b2darkgray
Destructive
#c22d00firebrick
#fa3a00orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2f5456darkslategray
#2f5456darkslategray

Contrast

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

Light mode
Text on background20.57:1AAA
Text on card20.54:1AAA
Primary button6.39:1AA
Secondary button6.25:1AA
Muted text6.51:1AA
Accent6.25:1AA
Destructive5.72:1AA
Dark mode
Text on background19.11:1AAA
Text on card19.14:1AAA
Primary button6.39:1AA
Secondary button8.43:1AAA
Muted text8.66:1AAA
Accent8.43:1AAA
Destructive3.70:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.099 0.012 198.571);
  --muted: oklch(0.91 0.004 200.839);
  --muted-foreground: oklch(0.416 0.022 200.318);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.418 0.042 200.008);
  --primary-foreground: oklch(0.906 0.021 200.618);
  --secondary: oklch(0.941 0.004 200.841);
  --secondary-foreground: oklch(0.449 0.017 200.453);
  --accent: oklch(0.941 0.004 200.841);
  --accent-foreground: oklch(0.449 0.017 200.453);
  --destructive: oklch(0.533 0.19 34.304);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.418 0.042 200.008);
  --chart-1: oklch(0.418 0.042 200.008);
  --chart-2: oklch(0.941 0.004 200.841);
  --chart-3: oklch(0.941 0.004 200.841);
  --chart-4: oklch(0.963 0.002 200.86);
  --chart-5: oklch(0.422 0.046 199.988);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.011 199.379);
  --foreground: oklch(0.987 0.003 200.854);
  --muted: oklch(0.241 0.005 200.636);
  --muted-foreground: oklch(0.794 0.019 200.604);
  --popover: oklch(0.155 0.013 199.815);
  --popover-foreground: oklch(0.993 0.001 200.872);
  --card: oklch(0.155 0.013 199.815);
  --card-foreground: oklch(0.993 0.001 200.872);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.418 0.042 200.008);
  --primary-foreground: oklch(0.906 0.021 200.618);
  --secondary: oklch(0.195 0.004 200.668);
  --secondary-foreground: oklch(0.756 0.01 200.723);
  --accent: oklch(0.195 0.004 200.668);
  --accent-foreground: oklch(0.756 0.01 200.723);
  --destructive: oklch(0.643 0.232 33.836);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.418 0.042 200.008);
  --chart-1: oklch(0.418 0.042 200.008);
  --chart-2: oklch(0.195 0.004 200.668);
  --chart-3: oklch(0.195 0.004 200.668);
  --chart-4: oklch(0.23 0.005 200.642);
  --chart-5: oklch(0.422 0.046 199.988);
}