Sofa for shadcn/ui

Sofa is a shadcn/ui theme built around a muted light green primary color (#f7f7f2) with muted light green accents (#e3e4dd). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light green primary (#f7f7f2) on a neutral background (#030401).

Color palette

TokenLightDark
Background
#ffffffwhite
#030401black
Foreground
#0b0c04black
#fdfdfbsnow
Card
#fcfcfcsnow
#070803black
Card foreground
#070802black
#ffffffwhite
Popover
#ffffffwhite
#030401black
Popover foreground
#0b0c04black
#fdfdfbsnow
Primary
#f7f7f2whitesmoke
#f7f7f2whitesmoke
Primary foreground
#31331edarkslategray
#31331edarkslategray
Secondary
#e3e4ddgainsboro
#2a2c21darkslategray
Secondary foreground
#4d4f40darkslategray
#c6c8b6silver
Muted
#e4e4e2gainsboro
#1d1d1bblack
Muted foreground
#5e5f59dimgray
#a5a6a0darkgray
Accent
#e3e4ddgainsboro
#2a2c21darkslategray
Accent foreground
#4d4f40darkslategray
#c6c8b6silver
Destructive
#b73710firebrick
#ed6035tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f7f7f2whitesmoke
#f7f7f2whitesmoke

Contrast

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

Light mode
Text on background19.65:1AAA
Text on card19.66:1AAA
Primary button12.07:1AAA
Secondary button6.53:1AA
Muted text5.07:1AA
Accent6.53:1AA
Destructive5.89:1AA
Dark mode
Text on background20.18:1AAA
Text on card20.13:1AAA
Primary button12.07:1AAA
Secondary button8.36:1AAA
Muted text6.85:1AA
Accent8.36:1AAA
Destructive6.34:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.148 0.019 113.831);
  --muted: oklch(0.919 0.004 112.621);
  --muted-foreground: oklch(0.481 0.009 112.881);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.148 0.019 113.831);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.129 0.017 113.555);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.975 0.007 112.679);
  --primary-foreground: oklch(0.314 0.035 114.666);
  --secondary: oklch(0.916 0.009 112.729);
  --secondary-foreground: oklch(0.422 0.025 113.656);
  --accent: oklch(0.916 0.009 112.729);
  --accent-foreground: oklch(0.422 0.025 113.656);
  --destructive: oklch(0.523 0.171 35.758);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.975 0.007 112.679);
  --chart-1: oklch(0.975 0.007 112.679);
  --chart-2: oklch(0.916 0.009 112.729);
  --chart-3: oklch(0.916 0.009 112.729);
  --chart-4: oklch(0.937 0.007 112.679);
  --chart-5: oklch(0.976 0.008 112.694);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.102 0.013 113.508);
  --foreground: oklch(0.995 0.003 112.593);
  --muted: oklch(0.231 0.005 112.973);
  --muted-foreground: oklch(0.723 0.008 112.748);
  --popover: oklch(0.102 0.013 113.508);
  --popover-foreground: oklch(0.995 0.003 112.593);
  --card: oklch(0.128 0.016 113.508);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.975 0.007 112.679);
  --primary-foreground: oklch(0.314 0.035 114.666);
  --secondary: oklch(0.286 0.019 113.77);
  --secondary-foreground: oklch(0.827 0.025 113.097);
  --accent: oklch(0.286 0.019 113.77);
  --accent-foreground: oklch(0.827 0.025 113.097);
  --destructive: oklch(0.664 0.184 37.136);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.975 0.007 112.679);
  --chart-1: oklch(0.975 0.007 112.679);
  --chart-2: oklch(0.286 0.019 113.77);
  --chart-3: oklch(0.286 0.019 113.77);
  --chart-4: oklch(0.32 0.022 113.821);
  --chart-5: oklch(0.976 0.008 112.694);
}