Lighting for shadcn/ui

Lighting is a shadcn/ui theme built around a near-black primary color (#000000) with near-black accents (#000000). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#000000) on a neutral background (#040101).

Color palette

TokenLightDark
Background
#ffffffwhite
#040101black
Foreground
#120202black
#fdfcfcsnow
Card
#fcfcfcsnow
#070303black
Card foreground
#0e0202black
#ffffffwhite
Popover
#ffffffwhite
#040101black
Popover foreground
#120202black
#fdfcfcsnow
Primary
#000000black
#000000black
Primary foreground
#999999darkgray
#999999darkgray
Secondary
#000000black
#000000black
Secondary foreground
#999999darkgray
#999999darkgray
Muted
#e9ddddgainsboro
#221616black
Muted foreground
#444141darkslategray
#bebbbbsilver
Accent
#000000black
#000000black
Accent foreground
#999999darkgray
#999999darkgray
Destructive
#d74709chocolate
#eb4d0aorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#000000black
#000000black

Contrast

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

Light mode
Text on background20.28:1AAA
Text on card19.98:1AAA
Primary button7.37:1AAA
Secondary button7.37:1AAA
Muted text7.63:1AAA
Accent7.37:1AAA
Destructive4.37:1AA Large
Dark mode
Text on background20.27:1AAA
Text on card20.53:1AAA
Primary button7.37:1AAA
Secondary button7.37:1AAA
Muted text9.20:1AAA
Accent7.37:1AAA
Destructive3.74:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.127 0.036 23.78);
  --muted: oklch(0.908 0.012 17.383);
  --muted-foreground: oklch(0.378 0.004 17.316);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.127 0.036 23.78);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.113 0.031 23.523);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0 0 0);
  --secondary-foreground: oklch(0.683 0 180);
  --accent: oklch(0 0 0);
  --accent-foreground: oklch(0.683 0 180);
  --destructive: oklch(0.596 0.19 38.238);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0 0 0);
  --chart-3: oklch(0 0 0);
  --chart-4: oklch(0.132 0 165.964);
  --chart-5: oklch(0 0 0);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.084 0.012 19.788);
  --foreground: oklch(0.991 0.002 17.183);
  --muted: oklch(0.217 0.018 18.672);
  --muted-foreground: oklch(0.795 0.003 17.22);
  --popover: oklch(0.084 0.012 19.788);
  --popover-foreground: oklch(0.991 0.002 17.183);
  --card: oklch(0.106 0.015 19.788);
  --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 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0 0 0);
  --secondary-foreground: oklch(0.683 0 180);
  --accent: oklch(0 0 0);
  --accent-foreground: oklch(0.683 0 180);
  --destructive: oklch(0.635 0.204 38.099);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0 0 0);
  --chart-3: oklch(0 0 0);
  --chart-4: oklch(0.132 0 165.964);
  --chart-5: oklch(0 0 0);
}