Sunlamp for shadcn/ui

Sunlamp is a shadcn/ui theme built around a vivid deep pink primary color (#1c030e) with vivid deep blue accents (#030e1c). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid deep pink primary (#1c030e) on a pink-tinted background (#0f050a).

Color palette

TokenLightDark
Background
#ffffffwhite
#0f050ablack
Foreground
#16040cblack
#fdfcfcsnow
Card
#ffffffwhite
#0f050ablack
Card foreground
#16040cblack
#fdfcfcsnow
Popover
#ffffffwhite
#0f050ablack
Popover foreground
#16040cblack
#fdfcfcsnow
Primary
#1c030eblack
#1c030eblack
Primary foreground
#ef62a1hotpink
#ef62a1hotpink
Secondary
#0e1c03black
#0e1c03black
Secondary foreground
#6cd416lawngreen
#6cd416lawngreen
Muted
#e5efdcbeige
#192310black
Muted foreground
#424a3bdarkslategray
#bcc4b5silver
Accent
#030e1cblack
#030e1cblack
Accent foreground
#62a1efcornflowerblue
#62a1efcornflowerblue
Destructive
#c0480cchocolate
#f1641echocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1c030eblack
#1c030eblack

Contrast

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

Light mode
Text on background19.87:1AAA
Text on card19.87:1AAA
Primary button6.49:1AA
Secondary button9.35:1AAA
Muted text7.78:1AAA
Accent7.25:1AAA
Destructive5.03:1AA
Dark mode
Text on background19.58:1AAA
Text on card19.58:1AAA
Primary button6.49:1AA
Secondary button9.35:1AAA
Muted text9.06:1AAA
Accent7.25:1AAA
Destructive6.56:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.145 0.04 351.959);
  --muted: oklch(0.939 0.028 130.722);
  --muted-foreground: oklch(0.396 0.026 131.08);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.145 0.04 351.959);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.145 0.04 351.959);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.157 0.051 353.819);
  --primary-foreground: oklch(0.691 0.184 354.954);
  --secondary: oklch(0.205 0.05 132.405);
  --secondary-foreground: oklch(0.777 0.225 135.948);
  --accent: oklch(0.161 0.035 250.746);
  --accent-foreground: oklch(0.701 0.132 254.343);
  --destructive: oklch(0.558 0.166 41.217);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.157 0.051 353.819);
  --chart-1: oklch(0.157 0.051 353.819);
  --chart-2: oklch(0.205 0.05 132.405);
  --chart-3: oklch(0.161 0.035 250.746);
  --chart-4: oklch(0.256 0.066 133.784);
  --chart-5: oklch(0.156 0.053 353.946);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.136 0.024 349.4);
  --foreground: oklch(0.992 0.001 347.846);
  --muted: oklch(0.241 0.038 132.17);
  --muted-foreground: oklch(0.81 0.022 130.695);
  --popover: oklch(0.136 0.024 349.4);
  --popover-foreground: oklch(0.992 0.001 347.846);
  --card: oklch(0.136 0.024 349.4);
  --card-foreground: oklch(0.992 0.001 347.846);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.157 0.051 353.819);
  --primary-foreground: oklch(0.691 0.184 354.954);
  --secondary: oklch(0.205 0.05 132.405);
  --secondary-foreground: oklch(0.777 0.225 135.948);
  --accent: oklch(0.161 0.035 250.746);
  --accent-foreground: oklch(0.701 0.132 254.343);
  --destructive: oklch(0.672 0.189 42.472);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.157 0.051 353.819);
  --chart-1: oklch(0.157 0.051 353.819);
  --chart-2: oklch(0.205 0.05 132.405);
  --chart-3: oklch(0.161 0.035 250.746);
  --chart-4: oklch(0.256 0.066 133.784);
  --chart-5: oklch(0.156 0.053 353.946);
}