Tart for shadcn/ui

Tart is a shadcn/ui theme built around a muted light violet primary color (#cabcd7) with muted light violet accents (#c2b4cf). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the muted light violet primary (#cabcd7) on a violet-tinted background (#0a060e).

Color palette

TokenLightDark
Background
#fcfbfewhite
#0a060eblack
Foreground
#0d0514black
#ffffffwhite
Card
#fcfbfewhite
#0a060eblack
Card foreground
#0d0514black
#ffffffwhite
Popover
#fcfbfewhite
#0a060eblack
Popover foreground
#0d0514black
#ffffffwhite
Primary
#cabcd7thistle
#cabcd7thistle
Primary foreground
#31243ddarkslategray
#31243ddarkslategray
Secondary
#d4cddalightgrey
#332d39darkslategray
Secondary foreground
#3b3243darkslategray
#ccc6d2lightgrey
Muted
#e8e0f1lavender
#170e1fblack
Muted foreground
#474748darkslategray
#b8b7b8silver
Accent
#c2b4cfsilver
#453753darkslategray
Accent foreground
#292032darkslategray
#ded7e4gainsboro
Destructive
#9f2c09firebrick
#e33f0dorangered
Destructive foreground
#fde5ddmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cabcd7thistle
#cabcd7thistle

Contrast

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

Light mode
Text on background19.47:1AAA
Text on card19.47:1AAA
Primary button8.03:1AAA
Secondary button7.86:1AAA
Muted text7.21:1AAA
Accent7.98:1AAA
Destructive6.13:1AA
Dark mode
Text on background20.04:1AAA
Text on card20.04:1AAA
Primary button8.03:1AAA
Secondary button7.95:1AAA
Muted text9.35:1AAA
Accent7.75:1AAA
Destructive4.22:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 309.092);
  --foreground: oklch(0.14 0.035 307.554);
  --muted: oklch(0.917 0.025 308.844);
  --muted-foreground: oklch(0.398 0.003 309.058);
  --popover: oklch(0.991 0.003 309.092);
  --popover-foreground: oklch(0.14 0.035 307.554);
  --card: oklch(0.991 0.003 309.092);
  --card-foreground: oklch(0.14 0.035 307.554);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.814 0.042 308.591);
  --primary-foreground: oklch(0.287 0.048 307.315);
  --secondary: oklch(0.858 0.019 308.891);
  --secondary-foreground: oklch(0.334 0.033 308.094);
  --accent: oklch(0.791 0.04 308.589);
  --accent-foreground: oklch(0.262 0.035 307.693);
  --destructive: oklch(0.469 0.156 35.453);
  --destructive-foreground: oklch(0.939 0.029 37.629);
  --ring: oklch(0.814 0.042 308.591);
  --chart-1: oklch(0.814 0.042 308.591);
  --chart-2: oklch(0.858 0.019 308.891);
  --chart-3: oklch(0.791 0.04 308.589);
  --chart-4: oklch(0.883 0.016 308.939);
  --chart-5: oklch(0.812 0.046 308.527);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.135 0.019 308.907);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.187 0.036 307.021);
  --muted-foreground: oklch(0.78 0.002 309.097);
  --popover: oklch(0.135 0.019 308.907);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.135 0.019 308.907);
  --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.814 0.042 308.591);
  --primary-foreground: oklch(0.287 0.048 307.315);
  --secondary: oklch(0.309 0.021 308.404);
  --secondary-foreground: oklch(0.836 0.017 308.916);
  --accent: oklch(0.364 0.05 307.669);
  --accent-foreground: oklch(0.889 0.019 308.897);
  --destructive: oklch(0.607 0.207 35.036);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.814 0.042 308.591);
  --chart-1: oklch(0.814 0.042 308.591);
  --chart-2: oklch(0.309 0.021 308.404);
  --chart-3: oklch(0.364 0.05 307.669);
  --chart-4: oklch(0.338 0.024 308.382);
  --chart-5: oklch(0.812 0.046 308.527);
}