Racer for shadcn/ui

Racer is a shadcn/ui theme built around a muted blue primary color (#798a9a) with muted light blue accents (#e2e5e9). The light mode uses a neutral background (#f8fafc). Dark mode keeps the muted blue primary (#798a9a) on a blue-tinted background (#070a0d).

Color palette

TokenLightDark
Background
#f8fafcghostwhite
#070a0dblack
Foreground
#040a10black
#f8fafbghostwhite
Card
#f4f7fbghostwhite
#090d11black
Card foreground
#03080cblack
#fcfcfdwhite
Popover
#f8fafcghostwhite
#070a0dblack
Popover foreground
#040a10black
#f8fafbghostwhite
Primary
#798a9alightslategray
#798a9alightslategray
Primary foreground
#000000black
#000000black
Secondary
#e2e5e9gainsboro
#2b2e31darkslategray
Secondary foreground
#434d56darkslategray
#c4c7casilver
Muted
#d7dbdfgainsboro
#202428darkslategray
Muted foreground
#525252darkslategray
#adadaddarkgray
Accent
#e2e5e9gainsboro
#2b2e31darkslategray
Accent foreground
#434d56darkslategray
#c4c7casilver
Destructive
#92290csaddlebrown
#d93d12orangered
Destructive foreground
#fcddd5mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#798a9alightslategray
#798a9alightslategray

Contrast

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

Light mode
Text on background18.98:1AAA
Text on card18.75:1AAA
Primary button5.90:1AA
Secondary button6.85:1AA
Muted text5.63:1AA
Accent6.85:1AA
Destructive6.45:1AA
Dark mode
Text on background18.93:1AAA
Text on card19.04:1AAA
Primary button5.90:1AA
Secondary button8.05:1AAA
Muted text6.98:1AA
Accent8.05:1AAA
Destructive4.54:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.984 0.004 247.863);
  --foreground: oklch(0.142 0.017 243.902);
  --muted: oklch(0.89 0.007 247.902);
  --muted-foreground: oklch(0.437 0 180);
  --popover: oklch(0.984 0.004 247.863);
  --popover-foreground: oklch(0.142 0.017 243.902);
  --card: oklch(0.976 0.006 247.885);
  --card-foreground: oklch(0.128 0.014 240.484);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.625 0.031 248.328);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.922 0.006 247.887);
  --secondary-foreground: oklch(0.413 0.021 248.335);
  --accent: oklch(0.922 0.006 247.887);
  --accent-foreground: oklch(0.413 0.021 248.335);
  --destructive: oklch(0.443 0.146 35.066);
  --destructive-foreground: oklch(0.92 0.036 35.943);
  --ring: oklch(0.625 0.031 248.328);
  --chart-1: oklch(0.625 0.031 248.328);
  --chart-2: oklch(0.922 0.006 247.887);
  --chart-3: oklch(0.922 0.006 247.887);
  --chart-4: oklch(0.945 0.004 247.866);
  --chart-5: oklch(0.624 0.038 248.436);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.143 0.009 245.888);
  --foreground: oklch(0.984 0.003 247.848);
  --muted: oklch(0.257 0.009 248.192);
  --muted-foreground: oklch(0.749 0 158.199);
  --popover: oklch(0.143 0.009 245.888);
  --popover-foreground: oklch(0.984 0.003 247.848);
  --card: oklch(0.155 0.011 248.192);
  --card-foreground: oklch(0.992 0.001 247.834);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.625 0.031 248.328);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.299 0.006 248.04);
  --secondary-foreground: oklch(0.828 0.006 247.897);
  --accent: oklch(0.299 0.006 248.04);
  --accent-foreground: oklch(0.828 0.006 247.897);
  --destructive: oklch(0.588 0.199 34.695);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.625 0.031 248.328);
  --chart-1: oklch(0.625 0.031 248.328);
  --chart-2: oklch(0.299 0.006 248.04);
  --chart-3: oklch(0.299 0.006 248.04);
  --chart-4: oklch(0.329 0.007 248.047);
  --chart-5: oklch(0.624 0.038 248.436);
}