Tomato for shadcn/ui

Tomato is a shadcn/ui theme built around a deep violet primary color (#54286c) with deep green accents (#406c28). The light mode uses a neutral background (#fbf7fd). Dark mode keeps the deep violet primary (#54286c) on a neutral background (#060208).

Color palette

TokenLightDark
Background
#fbf7fdghostwhite
#060208black
Foreground
#000000black
#f8f6f8whitesmoke
Card
#f9f3fcghostwhite
#09030cblack
Card foreground
#000000black
#faf9fbghostwhite
Popover
#fbf7fdghostwhite
#060208black
Popover foreground
#000000black
#f8f6f8whitesmoke
Primary
#54286cdarkslateblue
#54286cdarkslateblue
Primary foreground
#e7d6f0lavender
#e7d6f0lavender
Secondary
#406c28darkolivegreen
#406c28darkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e7ece4beige
#161b13black
Muted foreground
#444941darkslategray
#b9beb6silver
Accent
#406c28darkolivegreen
#406c28darkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#cd340afirebrick
#f44515orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#54286cdarkslateblue
#54286cdarkslateblue

Contrast

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

Light mode
Text on background19.78:1AAA
Text on card19.19:1AAA
Primary button8.05:1AAA
Secondary button6.19:1AA
Muted text7.68:1AAA
Accent6.19:1AA
Destructive5.15:1AA
Dark mode
Text on background19.13:1AAA
Text on card19.41:1AAA
Primary button8.05:1AAA
Secondary button6.19:1AA
Muted text9.27:1AAA
Accent6.19:1AA
Destructive3.67:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.01 314.166);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.937 0.011 134.286);
  --muted-foreground: oklch(0.398 0.015 134.44);
  --popover: oklch(0.98 0.01 314.166);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.97 0.014 314.138);
  --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.37 0.119 311.977);
  --primary-foreground: oklch(0.898 0.039 313.98);
  --secondary: oklch(0.483 0.11 136.142);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.483 0.11 136.142);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.558 0.195 34.197);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.37 0.119 311.977);
  --chart-1: oklch(0.37 0.119 311.977);
  --chart-2: oklch(0.483 0.11 136.142);
  --chart-3: oklch(0.483 0.11 136.142);
  --chart-4: oklch(0.518 0.119 136.177);
  --chart-5: oklch(0.369 0.125 311.763);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.103 0.024 316.247);
  --foreground: oklch(0.976 0.003 314.2);
  --muted: oklch(0.213 0.016 134.66);
  --muted-foreground: oklch(0.796 0.013 134.311);
  --popover: oklch(0.103 0.024 316.247);
  --popover-foreground: oklch(0.976 0.003 314.2);
  --card: oklch(0.119 0.028 315.907);
  --card-foreground: oklch(0.984 0.002 314.207);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.37 0.119 311.977);
  --primary-foreground: oklch(0.898 0.039 313.98);
  --secondary: oklch(0.483 0.11 136.142);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.483 0.11 136.142);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.643 0.218 34.691);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.37 0.119 311.977);
  --chart-1: oklch(0.37 0.119 311.977);
  --chart-2: oklch(0.483 0.11 136.142);
  --chart-3: oklch(0.483 0.11 136.142);
  --chart-4: oklch(0.518 0.119 136.177);
  --chart-5: oklch(0.369 0.125 311.763);
}