Race for shadcn/ui

Race is a shadcn/ui theme built around a vivid blue primary color (#138ccd) with muted light blue accents (#b9cbd5). The light mode uses a neutral background (#f6fbfd). Dark mode keeps the vivid blue primary (#138ccd) on a blue-tinted background (#070b0e).

Color palette

TokenLightDark
Background
#f6fbfdghostwhite
#070b0eblack
Foreground
#030c12black
#f6f8f8whitesmoke
Card
#f2f9fdaliceblue
#090e11black
Card foreground
#02090dblack
#f9fafbghostwhite
Popover
#f6fbfdghostwhite
#070b0eblack
Popover foreground
#030c12black
#f6f8f8whitesmoke
Primary
#138ccddodgerblue
#138ccddodgerblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d5dde2gainsboro
#252727darkslategray
Secondary foreground
#36464fdarkslategray
#bdc0c1silver
Muted
#eef4f7whitesmoke
#080e11black
Muted foreground
#394246darkslategray
#b9c1c6silver
Accent
#b9cbd5lightsteelblue
#343d41darkslategray
Accent foreground
#223139darkslategray
#cfd5d8lightgrey
Destructive
#c50a07firebrick
#f83d3atomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#138ccddodgerblue
#138ccddodgerblue

Contrast

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

Light mode
Text on background18.91:1AAA
Text on card18.83:1AAA
Primary button3.70:1AA Large
Secondary button7.12:1AAA
Muted text9.23:1AAA
Accent8.02:1AAA
Destructive6.14:1AA
Dark mode
Text on background18.52:1AAA
Text on card18.57:1AAA
Primary button3.70:1AA Large
Secondary button8.23:1AAA
Muted text10.63:1AAA
Accent7.52:1AAA
Destructive3.67:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.985 0.006 230.741);
  --foreground: oklch(0.148 0.021 228.023);
  --muted: oklch(0.962 0.008 230.769);
  --muted-foreground: oklch(0.372 0.013 231.198);
  --popover: oklch(0.985 0.006 230.741);
  --popover-foreground: oklch(0.148 0.021 228.023);
  --card: oklch(0.978 0.009 230.783);
  --card-foreground: oklch(0.134 0.019 224.178);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.612 0.137 240.665);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.893 0.012 230.839);
  --secondary-foreground: oklch(0.384 0.026 231.796);
  --accent: oklch(0.832 0.024 231.084);
  --accent-foreground: oklch(0.305 0.025 232.113);
  --destructive: oklch(0.52 0.209 29.095);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.612 0.137 240.665);
  --chart-1: oklch(0.612 0.137 240.665);
  --chart-2: oklch(0.893 0.012 230.839);
  --chart-3: oklch(0.832 0.024 231.084);
  --chart-4: oklch(0.916 0.009 230.795);
  --chart-5: oklch(0.616 0.14 241.201);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.147 0.009 229.679);
  --foreground: oklch(0.977 0.002 230.681);
  --muted: oklch(0.16 0.012 231.471);
  --muted-foreground: oklch(0.806 0.011 230.852);
  --popover: oklch(0.147 0.009 229.679);
  --popover-foreground: oklch(0.977 0.002 230.681);
  --card: oklch(0.159 0.011 231.493);
  --card-foreground: oklch(0.985 0.001 230.674);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.612 0.137 240.665);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.27 0.003 230.794);
  --secondary-foreground: oklch(0.806 0.003 230.716);
  --accent: oklch(0.352 0.014 231.248);
  --accent-foreground: oklch(0.869 0.008 230.789);
  --destructive: oklch(0.645 0.223 26.835);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.612 0.137 240.665);
  --chart-1: oklch(0.612 0.137 240.665);
  --chart-2: oklch(0.27 0.003 230.794);
  --chart-3: oklch(0.352 0.014 231.248);
  --chart-4: oklch(0.301 0.003 230.801);
  --chart-5: oklch(0.616 0.14 241.201);
}