erastus for shadcn/ui

erastus is a shadcn/ui theme built around a vivid blue primary color (#105bee) with near-white accents (#f4f4f4). The light mode uses a neutral background (#ffffff). Dark mode switches to a blue primary (#2b53c3) on a neutral background (#090909).

Color palette

TokenLightDark
Background
#ffffffwhite
#090909black
Foreground
#222222black
#eeeeeewhitesmoke
Card
#ffffffwhite
#090909black
Card foreground
#222222black
#eeeeeewhitesmoke
Popover
#ffffffwhite
#090909black
Popover foreground
#222222black
#eeeeeewhitesmoke
Primary
#105beeroyalblue
#2b53c3royalblue
Primary foreground
#ffffffwhite
#eeeeeewhitesmoke
Secondary
#eeeeeewhitesmoke
#242424darkslategray
Secondary foreground
#222222black
#eeeeeewhitesmoke
Muted
#eeeeeewhitesmoke
#1d1d1dblack
Muted foreground
#727272dimgray
#7d7d7dgray
Accent
#f4f4f4whitesmoke
#1a1a1ablack
Accent foreground
#222222black
#eeeeeewhitesmoke
Destructive
#bf4040brown
#bf4040brown
Destructive foreground
#ffffffwhite
#eeeeeewhitesmoke
Border
#e4e4e4gainsboro
#2c2c2cdarkslategray
Input
#d6d6d6lightgrey
#282828darkslategray
Ring
#0087ffdodgerblue
#576378dimgray

Contrast

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

Light mode
Text on background15.90:1AAA
Text on card15.90:1AAA
Primary button5.57:1AA
Secondary button13.71:1AAA
Muted text4.14:1AA Large
Accent14.49:1AAA
Destructive5.22:1AA
Dark mode
Text on background17.16:1AAA
Text on card17.16:1AAA
Primary button5.78:1AA
Secondary button13.33:1AAA
Muted text4.07:1AA Large
Accent14.92:1AAA
Destructive4.49:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.252 0 180);
  --muted: oklch(0.949 0 180);
  --muted-foreground: oklch(0.551 0 164.055);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.252 0 180);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.252 0 180);
  --border: oklch(0.917 0 172.875);
  --input: oklch(0.876 0 180);
  --primary: oklch(0.53 0.231 262.122);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.949 0 180);
  --secondary-foreground: oklch(0.252 0 180);
  --accent: oklch(0.968 0 191.31);
  --accent-foreground: oklch(0.252 0 180);
  --destructive: oklch(0.552 0.164 24.213);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.629 0.203 254.428);
  --chart-1: oklch(0.53 0.231 262.122);
  --chart-2: oklch(0.949 0 180);
  --chart-3: oklch(0.968 0 191.31);
  --chart-4: oklch(0.972 0 188.13);
  --chart-5: oklch(0.531 0.238 262.223);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0 180);
  --foreground: oklch(0.949 0 180);
  --muted: oklch(0.233 0 171.254);
  --muted-foreground: oklch(0.588 0 180);
  --popover: oklch(0.14 0 180);
  --popover-foreground: oklch(0.949 0 180);
  --card: oklch(0.14 0 180);
  --card-foreground: oklch(0.949 0 180);
  --border: oklch(0.294 0 180);
  --input: oklch(0.278 0 180);
  --primary: oklch(0.484 0.181 265.135);
  --primary-foreground: oklch(0.949 0 180);
  --secondary: oklch(0.262 0 161.565);
  --secondary-foreground: oklch(0.949 0 180);
  --accent: oklch(0.22 0 187.595);
  --accent-foreground: oklch(0.949 0 180);
  --destructive: oklch(0.552 0.164 24.213);
  --destructive-foreground: oklch(0.949 0 180);
  --ring: oklch(0.497 0.036 260.402);
  --chart-1: oklch(0.484 0.181 265.135);
  --chart-2: oklch(0.262 0 161.565);
  --chart-3: oklch(0.22 0 187.595);
  --chart-4: oklch(0.293 0 171.87);
  --chart-5: oklch(0.482 0.189 264.909);
}