Elver for shadcn/ui

Elver is a shadcn/ui theme built around a vivid blue primary color (#3c75fb) with vivid yellow accents (#fbc23c). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid blue primary (#3c75fb) on a neutral background (#030408).

Color palette

TokenLightDark
Background
#ffffffwhite
#030408black
Foreground
#02050dblack
#f6f7f8whitesmoke
Card
#ffffffwhite
#030408black
Card foreground
#02050dblack
#f6f7f8whitesmoke
Popover
#ffffffwhite
#030408black
Popover foreground
#02050dblack
#f6f7f8whitesmoke
Primary
#3c75fbroyalblue
#3c75fbroyalblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#fbc23csandybrown
#fbc23csandybrown
Secondary foreground
#050400black
#050400black
Muted
#ece7daantiquewhite
#252013black
Muted foreground
#5a5549darkolivegreen
#b6b1a5darkgray
Accent
#fbc23csandybrown
#fbc23csandybrown
Accent foreground
#050400black
#050400black
Destructive
#c52602firebrick
#fd451corangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3c75fbroyalblue
#3c75fbroyalblue

Contrast

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

Light mode
Text on background20.38:1AAA
Text on card20.38:1AAA
Primary button4.07:1AA Large
Secondary button12.56:1AAA
Muted text5.99:1AA
Accent12.56:1AAA
Destructive5.75:1AA
Dark mode
Text on background19.10:1AAA
Text on card19.10:1AAA
Primary button4.07:1AA Large
Secondary button12.56:1AAA
Muted text7.59:1AAA
Accent12.56:1AAA
Destructive3.48:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.117 0.023 256.883);
  --muted: oklch(0.928 0.018 87.511);
  --muted-foreground: oklch(0.45 0.019 87.566);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.117 0.023 256.883);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.117 0.023 256.883);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.602 0.209 263.762);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.843 0.155 84.031);
  --secondary-foreground: oklch(0.103 0.02 96.239);
  --accent: oklch(0.843 0.155 84.031);
  --accent-foreground: oklch(0.103 0.02 96.239);
  --destructive: oklch(0.533 0.198 32.545);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.602 0.209 263.762);
  --chart-1: oklch(0.602 0.209 263.762);
  --chart-2: oklch(0.843 0.155 84.031);
  --chart-3: oklch(0.843 0.155 84.031);
  --chart-4: oklch(0.854 0.148 84.968);
  --chart-5: oklch(0.6 0.215 263.669);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.012 260.952);
  --foreground: oklch(0.976 0.002 267.407);
  --muted: oklch(0.245 0.024 87.346);
  --muted-foreground: oklch(0.76 0.017 87.52);
  --popover: oklch(0.107 0.012 260.952);
  --popover-foreground: oklch(0.976 0.002 267.407);
  --card: oklch(0.107 0.012 260.952);
  --card-foreground: oklch(0.976 0.002 267.407);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.602 0.209 263.762);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.843 0.155 84.031);
  --secondary-foreground: oklch(0.103 0.02 96.239);
  --accent: oklch(0.843 0.155 84.031);
  --accent-foreground: oklch(0.103 0.02 96.239);
  --destructive: oklch(0.657 0.225 33.479);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.602 0.209 263.762);
  --chart-1: oklch(0.602 0.209 263.762);
  --chart-2: oklch(0.843 0.155 84.031);
  --chart-3: oklch(0.843 0.155 84.031);
  --chart-4: oklch(0.854 0.148 84.968);
  --chart-5: oklch(0.6 0.215 263.669);
}