Subtitle for shadcn/ui

Subtitle is a shadcn/ui theme built around a vivid deep red primary color (#280101) with muted red accents (#c5b5b5). The light mode uses a neutral background (#fdfbfb). Dark mode keeps the vivid deep red primary (#280101) on a red-tinted background (#0e0606).

Color palette

TokenLightDark
Background
#fdfbfbsnow
#0e0606black
Foreground
#000000black
#fdfbfcsnow
Card
#fcf8f8snow
#120808black
Card foreground
#000000black
#ffffffwhite
Popover
#fcf8f8snow
#120808black
Popover foreground
#000000black
#ffffffwhite
Primary
#280101black
#280101black
Primary foreground
#fd5e61tomato
#fd5e61tomato
Secondary
#cecacalightgrey
#2c2121black
Secondary foreground
#353131darkslategray
#c8b6b7silver
Muted
#e7d0d0gainsboro
#2f1819black
Muted foreground
#4c3e3edarkslategray
#c1b3b3silver
Accent
#c5b5b5silver
#4a3031darkslategray
Accent foreground
#281f20black
#dfcecelightgrey
Destructive
#9b3f0dsaddlebrown
#d35612chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#280101black
#280101black

Contrast

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

Light mode
Text on background20.44:1AAA
Text on card19.90:1AAA
Primary button6.35:1AA
Secondary button7.90:1AAA
Muted text6.92:1AA
Accent8.12:1AAA
Destructive6.76:1AA
Dark mode
Text on background19.43:1AAA
Text on card19.76:1AAA
Primary button6.35:1AA
Secondary button8.06:1AAA
Muted text8.17:1AAA
Accent7.85:1AAA
Destructive4.11:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 16.011);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.876 0.026 16.497);
  --muted-foreground: oklch(0.378 0.019 16.904);
  --popover: oklch(0.982 0.004 16.05);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.982 0.004 16.05);
  --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.176 0.07 26.945);
  --primary-foreground: oklch(0.691 0.193 22.74);
  --secondary: oklch(0.842 0.005 16.069);
  --secondary-foreground: oklch(0.317 0.006 16.301);
  --accent: oklch(0.786 0.018 16.388);
  --accent-foreground: oklch(0.251 0.013 16.942);
  --destructive: oklch(0.486 0.135 43.495);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.176 0.07 26.945);
  --chart-1: oklch(0.176 0.07 26.945);
  --chart-2: oklch(0.842 0.005 16.069);
  --chart-3: oklch(0.786 0.018 16.388);
  --chart-4: oklch(0.866 0.004 16.052);
  --chart-5: oklch(0.176 0.072 27.556);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.136 0.016 17.96);
  --foreground: oklch(0.991 0.002 16.011);
  --muted: oklch(0.242 0.037 19.063);
  --muted-foreground: oklch(0.779 0.016 16.335);
  --popover: oklch(0.148 0.018 18.258);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.148 0.018 18.258);
  --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.176 0.07 26.945);
  --primary-foreground: oklch(0.691 0.193 22.74);
  --secondary: oklch(0.26 0.017 17.15);
  --secondary-foreground: oklch(0.792 0.02 16.435);
  --accent: oklch(0.341 0.038 18.115);
  --accent-foreground: oklch(0.864 0.019 16.369);
  --destructive: oklch(0.608 0.173 42.929);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.176 0.07 26.945);
  --chart-1: oklch(0.176 0.07 26.945);
  --chart-2: oklch(0.26 0.017 17.15);
  --chart-3: oklch(0.341 0.038 18.115);
  --chart-4: oklch(0.29 0.019 17.213);
  --chart-5: oklch(0.176 0.072 27.556);
}