Efsun for shadcn/ui

Efsun is a shadcn/ui theme built around a near-black primary color (#18181b) with near-white accents (#efefef). The light mode uses a neutral background (#ffffff). Dark mode switches to a near-white primary (#ffffff) on a neutral background (#18181b).

Color palette

TokenLightDark
Background
#ffffffwhite
#18181bblack
Foreground
#18181bblack
#ffffffwhite
Card
#ffffffwhite
#161619black
Card foreground
#18181bblack
#ffffffwhite
Popover
#ffffffwhite
#161619black
Popover foreground
#18181bblack
#ffffffwhite
Primary
#18181bblack
#ffffffwhite
Primary foreground
#ffffffwhite
#18181bblack
Secondary
#f1f1f1whitesmoke
#252528darkslategray
Secondary foreground
#565656dimgray
#c7c7c7silver
Muted
#f7f7f7whitesmoke
#121212black
Muted foreground
#565656dimgray
#a5a7b1darkgray
Accent
#efefefwhitesmoke
#242424darkslategray
Accent foreground
#565656dimgray
#c7c7c7silver
Destructive
#cc0450crimson
#ee1d54crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#efefefwhitesmoke
#292929darkslategray
Input
#efefefwhitesmoke
#292929darkslategray
Ring
#18181bblack
#ffffffwhite

Contrast

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

Light mode
Text on background17.71:1AAA
Text on card17.71:1AAA
Primary button17.71:1AAA
Secondary button6.51:1AA
Muted text6.85:1AA
Accent6.40:1AA
Destructive5.67:1AA
Dark mode
Text on background17.71:1AAA
Text on card18.05:1AAA
Primary button17.71:1AAA
Secondary button9.04:1AAA
Muted text7.81:1AAA
Accent9.18:1AAA
Destructive4.23:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.21 0.006 285.885);
  --muted: oklch(0.976 0 180);
  --muted-foreground: oklch(0.453 0 170.538);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.21 0.006 285.885);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.21 0.006 285.885);
  --border: oklch(0.953 0 198.435);
  --input: oklch(0.952 0 165.964);
  --primary: oklch(0.21 0.006 285.885);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.959 0 187.595);
  --secondary-foreground: oklch(0.454 0 180);
  --accent: oklch(0.953 0 198.435);
  --accent-foreground: oklch(0.453 0 170.538);
  --destructive: oklch(0.541 0.215 10.785);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.21 0.006 285.885);
  --chart-1: oklch(0.21 0.006 285.885);
  --chart-2: oklch(0.959 0 187.595);
  --chart-3: oklch(0.953 0 198.435);
  --chart-4: oklch(0.982 0 180);
  --chart-5: oklch(0.208 0.009 285.6);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.21 0.006 285.885);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.182 0 169.695);
  --muted-foreground: oklch(0.729 0.015 279.029);
  --popover: oklch(0.202 0.006 285.856);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.202 0.006 285.856);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.282 0 165.964);
  --input: oklch(0.281 0 180);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.21 0.006 285.885);
  --secondary: oklch(0.266 0.006 285.984);
  --secondary-foreground: oklch(0.83 0 180);
  --accent: oklch(0.26 0 180);
  --accent-foreground: oklch(0.83 0 180);
  --destructive: oklch(0.612 0.233 15.054);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.266 0.006 285.984);
  --chart-3: oklch(0.26 0 180);
  --chart-4: oklch(0.296 0.007 285.963);
  --chart-5: oklch(1 0 180);
}