Lightning for shadcn/ui

Lightning is a shadcn/ui theme built around a vivid green primary color (#f2fe6c) with muted light green accents (#d2d3c5). The light mode uses a neutral background (#fbfcf8). Dark mode keeps the vivid green primary (#f2fe6c) on a green-tinted background (#0e0e06).

Color palette

TokenLightDark
Background
#fbfcf8snow
#0e0e06black
Foreground
#131505black
#fbfcf8snow
Card
#f9faf5whitesmoke
#111208black
Card foreground
#0f1004black
#fdfdfcwhite
Popover
#f9faf5whitesmoke
#111208black
Popover foreground
#0f1004black
#fdfdfcwhite
Primary
#f2fe6ckhaki
#f2fe6ckhaki
Primary foreground
#333800darkgreen
#333800darkgreen
Secondary
#e7e7e4gainsboro
#35362bdarkslategray
Secondary foreground
#505148darkslategray
#cecfc4lightgrey
Muted
#e3e4d7gainsboro
#27281bblack
Muted foreground
#575851dimgray
#aeaea7darkgray
Accent
#d2d3c5lightgrey
#505337darkolivegreen
Accent foreground
#393a2cdarkslategray
#e3e4d7gainsboro
Destructive
#b44e13sienna
#e7671dchocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e7e7e4gainsboro
#1e1e1ablack
Input
#e7e7e4gainsboro
#1e1e1ablack
Ring
#f2fe6ckhaki
#f2fe6ckhaki

Contrast

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

Light mode
Text on background17.88:1AAA
Text on card18.26:1AAA
Primary button11.25:1AAA
Secondary button6.48:1AA
Muted text5.62:1AA
Accent7.64:1AAA
Destructive5.19:1AA
Dark mode
Text on background18.77:1AAA
Text on card18.52:1AAA
Primary button11.25:1AAA
Secondary button7.80:1AAA
Muted text6.71:1AA
Accent6.22:1AA
Destructive6.36:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.004 110.331);
  --foreground: oklch(0.187 0.03 112.928);
  --muted: oklch(0.916 0.018 110.607);
  --muted-foreground: oklch(0.456 0.011 110.683);
  --popover: oklch(0.983 0.007 110.373);
  --popover-foreground: oklch(0.169 0.026 112.606);
  --card: oklch(0.983 0.007 110.373);
  --card-foreground: oklch(0.169 0.026 112.606);
  --border: oklch(0.928 0.005 110.343);
  --input: oklch(0.928 0.005 110.343);
  --primary: oklch(0.961 0.169 113.551);
  --primary-foreground: oklch(0.324 0.073 114.821);
  --secondary: oklch(0.927 0.004 110.329);
  --secondary-foreground: oklch(0.432 0.015 110.879);
  --accent: oklch(0.862 0.019 110.664);
  --accent-foreground: oklch(0.343 0.024 111.524);
  --destructive: oklch(0.548 0.148 45.025);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.961 0.169 113.551);
  --chart-1: oklch(0.961 0.169 113.551);
  --chart-2: oklch(0.927 0.004 110.329);
  --chart-3: oklch(0.862 0.019 110.664);
  --chart-4: oklch(0.949 0.003 110.303);
  --chart-5: oklch(0.967 0.172 113.616);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.162 0.018 111.975);
  --foreground: oklch(0.989 0.005 110.341);
  --muted: oklch(0.27 0.023 111.824);
  --muted-foreground: oklch(0.749 0.009 110.483);
  --popover: oklch(0.177 0.02 112.269);
  --popover-foreground: oklch(0.995 0.002 110.293);
  --card: oklch(0.177 0.02 112.269);
  --card-foreground: oklch(0.995 0.002 110.293);
  --border: oklch(0.233 0.007 110.832);
  --input: oklch(0.233 0.007 110.832);
  --primary: oklch(0.961 0.169 113.551);
  --primary-foreground: oklch(0.324 0.073 114.821);
  --secondary: oklch(0.328 0.018 111.268);
  --secondary-foreground: oklch(0.851 0.016 110.598);
  --accent: oklch(0.431 0.043 112.058);
  --accent-foreground: oklch(0.916 0.018 110.607);
  --destructive: oklch(0.662 0.177 45.175);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.961 0.169 113.551);
  --chart-1: oklch(0.961 0.169 113.551);
  --chart-2: oklch(0.328 0.018 111.268);
  --chart-3: oklch(0.431 0.043 112.058);
  --chart-4: oklch(0.36 0.021 111.297);
  --chart-5: oklch(0.967 0.172 113.616);
}