Driving for shadcn/ui

Driving is a shadcn/ui theme built around a muted deep red primary color (#130c0c) with muted deep teal accents (#0c1313). The light mode uses a neutral background (#fefbfb). Dark mode keeps the muted deep red primary (#130c0c) on a red-tinted background (#0c0303).

Color palette

TokenLightDark
Background
#fefbfbsnow
#0c0303black
Foreground
#0d0303black
#faf9f9snow
Card
#fdf7f7snow
#100404black
Card foreground
#080202black
#fdfcfcsnow
Popover
#fdf7f7snow
#100404black
Popover foreground
#080202black
#fdfcfcsnow
Primary
#130c0cblack
#130c0cblack
Primary foreground
#bd9393rosybrown
#bd9393rosybrown
Secondary
#0c1313black
#0c1313black
Secondary foreground
#93bdbddarkgray
#93bdbddarkgray
Muted
#d1ebebgainsboro
#142e2edarkslategray
Muted foreground
#3d4242darkslategray
#bdc2c2silver
Accent
#0c1313black
#0c1313black
Accent foreground
#93bdbddarkgray
#93bdbddarkgray
Destructive
#ba210dfirebrick
#f25540tomato
Destructive foreground
#fffbfasnow
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#130c0cblack
#130c0cblack

Contrast

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

Light mode
Text on background19.75:1AAA
Text on card19.38:1AAA
Primary button7.16:1AAA
Secondary button9.17:1AAA
Muted text8.15:1AAA
Accent9.17:1AAA
Destructive6.16:1AA
Dark mode
Text on background19.38:1AAA
Text on card19.67:1AAA
Primary button7.16:1AAA
Secondary button9.17:1AAA
Muted text7.97:1AAA
Accent9.17:1AAA
Destructive6.13:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 17.218);
  --foreground: oklch(0.117 0.024 21.496);
  --muted: oklch(0.921 0.027 196.689);
  --muted-foreground: oklch(0.375 0.007 196.868);
  --popover: oklch(0.98 0.007 17.28);
  --popover-foreground: oklch(0.102 0.021 21.445);
  --card: oklch(0.98 0.007 17.28);
  --card-foreground: oklch(0.102 0.021 21.445);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.163 0.013 18.564);
  --primary-foreground: oklch(0.704 0.05 18.419);
  --secondary: oklch(0.179 0.011 196.198);
  --secondary-foreground: oklch(0.769 0.044 196.267);
  --accent: oklch(0.179 0.011 196.198);
  --accent-foreground: oklch(0.769 0.044 196.267);
  --destructive: oklch(0.51 0.19 30.96);
  --destructive-foreground: oklch(0.99 0.004 26.469);
  --ring: oklch(0.163 0.013 18.564);
  --chart-1: oklch(0.163 0.013 18.564);
  --chart-2: oklch(0.179 0.011 196.198);
  --chart-3: oklch(0.179 0.011 196.198);
  --chart-4: oklch(0.218 0.016 196.057);
  --chart-5: oklch(0.162 0.015 18.774);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.118 0.022 20.929);
  --foreground: oklch(0.984 0.001 17.178);
  --muted: oklch(0.281 0.032 195.491);
  --muted-foreground: oklch(0.809 0.006 197.045);
  --popover: oklch(0.132 0.025 21.127);
  --popover-foreground: oklch(0.992 0.001 17.168);
  --card: oklch(0.132 0.025 21.127);
  --card-foreground: oklch(0.992 0.001 17.168);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.163 0.013 18.564);
  --primary-foreground: oklch(0.704 0.05 18.419);
  --secondary: oklch(0.179 0.011 196.198);
  --secondary-foreground: oklch(0.769 0.044 196.267);
  --accent: oklch(0.179 0.011 196.198);
  --accent-foreground: oklch(0.769 0.044 196.267);
  --destructive: oklch(0.658 0.196 30.504);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.163 0.013 18.564);
  --chart-1: oklch(0.163 0.013 18.564);
  --chart-2: oklch(0.179 0.011 196.198);
  --chart-3: oklch(0.179 0.011 196.198);
  --chart-4: oklch(0.218 0.016 196.057);
  --chart-5: oklch(0.162 0.015 18.774);
}