light-plus-syntax for shadcn/ui

light-plus-syntax is a shadcn/ui theme built around a near-black primary color (#1f1f1f) with neutral gray accents (#adadad). The light mode uses a neutral background (#d4d4d4). Dark mode keeps the near-black primary (#1f1f1f) on a neutral background (#d4d4d4).

Color palette

TokenLightDark
Background
#d4d4d4lightgrey
#d4d4d4lightgrey
Foreground
#1f1f1fblack
#1f1f1fblack
Card
#cfcfcflightgrey
#cfcfcflightgrey
Card foreground
#121212black
#121212black
Popover
#cccccclightgrey
#cccccclightgrey
Popover foreground
#050505black
#050505black
Primary
#1f1f1fblack
#1f1f1fblack
Primary foreground
#b8b8b8silver
#b8b8b8silver
Secondary
#bfbfbfsilver
#bfbfbfsilver
Secondary foreground
#262626darkslategray
#262626darkslategray
Muted
#d0c3c3silver
#d0c3c3silver
Muted foreground
#392d2ddarkslategray
#392d2ddarkslategray
Accent
#adadaddarkgray
#adadaddarkgray
Accent foreground
#141414black
#141414black
Destructive
#c01202firebrick
#c01202firebrick
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#c7c7c7silver
#c7c7c7silver
Input
#bfbfbfsilver
#bfbfbfsilver
Ring
#1f1f1fblack
#1f1f1fblack

Contrast

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

Light mode
Text on background11.08:1AAA
Text on card11.97:1AAA
Primary button8.34:1AAA
Secondary button8.25:1AAA
Muted text7.73:1AAA
Accent8.24:1AAA
Destructive6.31:1AA
Dark mode
Text on background11.08:1AAA
Text on card11.97:1AAA
Primary button8.34:1AAA
Secondary button8.25:1AAA
Muted text7.73:1AAA
Accent8.24:1AAA
Destructive6.31:1AA

CSS variables

Paste this into your globals.css to use light-plus-syntax in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.869 0 165.964);
  --foreground: oklch(0.238 0 161.565);
  --muted: oklch(0.828 0.014 17.449);
  --muted-foreground: oklch(0.31 0.018 18.169);
  --popover: oklch(0.845 0 164.055);
  --popover-foreground: oklch(0.116 0 180);
  --card: oklch(0.853 0 168.69);
  --card-foreground: oklch(0.182 0 164.055);
  --border: oklch(0.829 0 180);
  --input: oklch(0.805 0 169.695);
  --primary: oklch(0.238 0 161.565);
  --primary-foreground: oklch(0.781 0 180);
  --secondary: oklch(0.805 0 169.695);
  --secondary-foreground: oklch(0.27 0 180);
  --accent: oklch(0.749 0 158.199);
  --accent-foreground: oklch(0.193 0 164.055);
  --destructive: oklch(0.512 0.203 30.169);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.238 0 161.565);
  --chart-1: oklch(0.238 0 161.565);
  --chart-2: oklch(0.805 0 169.695);
  --chart-3: oklch(0.749 0 158.199);
  --chart-4: oklch(0.829 0 180);
  --chart-5: oklch(0.236 0.003 17.356);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.869 0 165.964);
  --foreground: oklch(0.238 0 161.565);
  --muted: oklch(0.828 0.014 17.449);
  --muted-foreground: oklch(0.31 0.018 18.169);
  --popover: oklch(0.845 0 164.055);
  --popover-foreground: oklch(0.116 0 180);
  --card: oklch(0.853 0 168.69);
  --card-foreground: oklch(0.182 0 164.055);
  --border: oklch(0.829 0 180);
  --input: oklch(0.805 0 169.695);
  --primary: oklch(0.238 0 161.565);
  --primary-foreground: oklch(0.781 0 180);
  --secondary: oklch(0.805 0 169.695);
  --secondary-foreground: oklch(0.27 0 180);
  --accent: oklch(0.749 0 158.199);
  --accent-foreground: oklch(0.193 0 164.055);
  --destructive: oklch(0.512 0.203 30.169);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.238 0 161.565);
  --chart-1: oklch(0.238 0 161.565);
  --chart-2: oklch(0.805 0 169.695);
  --chart-3: oklch(0.749 0 158.199);
  --chart-4: oklch(0.829 0 180);
  --chart-5: oklch(0.236 0.003 17.356);
}