Mileage for shadcn/ui

Mileage is a shadcn/ui theme built around a light blue primary color (#d4e1f2) with muted blue accents (#b4bcc5). The light mode uses a neutral background (#ffffff). Dark mode keeps the light blue primary (#d4e1f2) on a neutral background (#030507).

Color palette

TokenLightDark
Background
#ffffffwhite
#030507black
Foreground
#000000black
#ffffffwhite
Card
#ffffffwhite
#030507black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#030507black
Popover foreground
#000000black
#ffffffwhite
Primary
#d4e1f2lavender
#d4e1f2lavender
Primary foreground
#224572darkslategray
#224572darkslategray
Secondary
#d2d3d5lightgrey
#1a1c1eblack
Secondary foreground
#383a3ddarkslategray
#b0b4basilver
Muted
#dcdee0gainsboro
#1f2123black
Muted foreground
#585d65dimgray
#9aa0a7darkgray
Accent
#b4bcc5silver
#2c323adarkslategray
Accent foreground
#1f2328darkslategray
#c5cbd3lightgrey
Destructive
#651c06maroon
#eb420forangered
Destructive foreground
#f9b8a4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d4e1f2lavender
#d4e1f2lavender

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.32:1AAA
Secondary button7.63:1AAA
Muted text4.89:1AA
Accent8.20:1AAA
Destructive7.21:1AAA
Dark mode
Text on background20.43:1AAA
Text on card20.43:1AAA
Primary button7.32:1AAA
Secondary button8.21:1AAA
Muted text6.13:1AA
Accent7.91:1AAA
Destructive3.94:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.898 0.004 254.979);
  --muted-foreground: oklch(0.478 0.014 255.093);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.905 0.027 255.097);
  --primary-foreground: oklch(0.387 0.087 255.961);
  --secondary: oklch(0.868 0.003 254.974);
  --secondary-foreground: oklch(0.349 0.005 255.033);
  --accent: oklch(0.791 0.016 255.056);
  --accent-foreground: oklch(0.255 0.012 255.152);
  --destructive: oklch(0.343 0.108 36.317);
  --destructive-foreground: oklch(0.837 0.081 37.613);
  --ring: oklch(0.905 0.027 255.097);
  --chart-1: oklch(0.905 0.027 255.097);
  --chart-2: oklch(0.868 0.003 254.974);
  --chart-3: oklch(0.791 0.016 255.056);
  --chart-4: oklch(0.891 0.003 254.97);
  --chart-5: oklch(0.904 0.029 255.104);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.111 0.01 248.334);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.246 0.006 255.07);
  --muted-foreground: oklch(0.703 0.013 255.046);
  --popover: oklch(0.111 0.01 248.334);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.111 0.01 248.334);
  --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.905 0.027 255.097);
  --primary-foreground: oklch(0.387 0.087 255.961);
  --secondary: oklch(0.225 0.005 255.065);
  --secondary-foreground: oklch(0.769 0.01 255.02);
  --accent: oklch(0.315 0.017 255.179);
  --accent-foreground: oklch(0.84 0.013 255.034);
  --destructive: oklch(0.624 0.212 35.106);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.905 0.027 255.097);
  --chart-1: oklch(0.905 0.027 255.097);
  --chart-2: oklch(0.225 0.005 255.065);
  --chart-3: oklch(0.315 0.017 255.179);
  --chart-4: oklch(0.257 0.006 255.072);
  --chart-5: oklch(0.904 0.029 255.104);
}