Tart for shadcn/ui

Tart is a shadcn/ui theme built around a neutral gray primary color (#cdd0ce) with neutral gray accents (#d0cdcf). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#cdd0ce) on a green-tinted background (#040b07).

Color palette

TokenLightDark
Background
#ffffffwhite
#040b07black
Foreground
#000000black
#f9fbfamintcream
Card
#ffffffwhite
#040b07black
Card foreground
#000000black
#f9fbfamintcream
Popover
#ffffffwhite
#040b07black
Popover foreground
#000000black
#f9fbfamintcream
Primary
#cdd0celightgrey
#cdd0celightgrey
Primary foreground
#343735darkslategray
#343735darkslategray
Secondary
#d0cdcflightgrey
#d0cdcflightgrey
Secondary foreground
#373436darkslategray
#373436darkslategray
Muted
#e2d0dagainsboro
#2f1d28darkslategray
Muted foreground
#585657dimgray
#a9a7a8darkgray
Accent
#d0cdcflightgrey
#d0cdcflightgrey
Accent foreground
#373436darkslategray
#373436darkslategray
Destructive
#771e08maroon
#f1603btomato
Destructive foreground
#fac5b7lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cdd0celightgrey
#cdd0celightgrey

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.75:1AAA
Secondary button7.80:1AAA
Muted text4.94:1AA
Accent7.80:1AAA
Destructive6.93:1AA
Dark mode
Text on background19.10:1AAA
Text on card19.10:1AAA
Primary button7.75:1AAA
Secondary button7.80:1AAA
Muted text6.59:1AA
Accent7.80:1AAA
Destructive6.48:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.875 0.024 341.636);
  --muted-foreground: oklch(0.455 0.003 341.154);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.855 0.004 160.905);
  --primary-foreground: oklch(0.334 0.005 160.623);
  --secondary: oklch(0.851 0.004 341.121);
  --secondary-foreground: oklch(0.329 0.006 341.402);
  --accent: oklch(0.851 0.004 341.121);
  --accent-foreground: oklch(0.329 0.006 341.402);
  --destructive: oklch(0.38 0.127 34.364);
  --destructive-foreground: oklch(0.866 0.064 34.409);
  --ring: oklch(0.855 0.004 160.905);
  --chart-1: oklch(0.855 0.004 160.905);
  --chart-2: oklch(0.851 0.004 341.121);
  --chart-3: oklch(0.851 0.004 341.121);
  --chart-4: oklch(0.875 0.003 341.101);
  --chart-5: oklch(0.857 0.008 160.797);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.017 160.822);
  --foreground: oklch(0.986 0.002 160.968);
  --muted: oklch(0.259 0.032 343.737);
  --muted-foreground: oklch(0.732 0.002 341.091);
  --popover: oklch(0.14 0.017 160.822);
  --popover-foreground: oklch(0.986 0.002 160.968);
  --card: oklch(0.14 0.017 160.822);
  --card-foreground: oklch(0.986 0.002 160.968);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.855 0.004 160.905);
  --primary-foreground: oklch(0.334 0.005 160.623);
  --secondary: oklch(0.851 0.004 341.121);
  --secondary-foreground: oklch(0.329 0.006 341.402);
  --accent: oklch(0.851 0.004 341.121);
  --accent-foreground: oklch(0.329 0.006 341.402);
  --destructive: oklch(0.67 0.187 35.141);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.855 0.004 160.905);
  --chart-1: oklch(0.855 0.004 160.905);
  --chart-2: oklch(0.851 0.004 341.121);
  --chart-3: oklch(0.851 0.004 341.121);
  --chart-4: oklch(0.875 0.003 341.101);
  --chart-5: oklch(0.857 0.008 160.797);
}