Neon for shadcn/ui

Neon is a shadcn/ui theme built around a muted deep green primary color (#545d37) with muted deep green accents (#405d37). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep green primary (#545d37) on a neutral background (#060802).

Color palette

TokenLightDark
Background
#ffffffwhite
#060802black
Foreground
#0b0d02black
#f9faf5whitesmoke
Card
#ffffffwhite
#060802black
Card foreground
#0b0d02black
#f9faf5whitesmoke
Popover
#ffffffwhite
#060802black
Popover foreground
#0b0d02black
#f9faf5whitesmoke
Primary
#545d37darkolivegreen
#545d37darkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#5d5437darkolivegreen
#5d5437darkolivegreen
Secondary foreground
#eae7dcantiquewhite
#eae7dcantiquewhite
Muted
#e9e3d3gainsboro
#2c2716black
Muted foreground
#41403edarkslategray
#c1c0besilver
Accent
#405d37darkolivegreen
#405d37darkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#c13401firebrick
#f44201orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#545d37darkolivegreen
#545d37darkolivegreen

Contrast

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

Light mode
Text on background19.57:1AAA
Text on card19.57:1AAA
Primary button7.00:1AAA
Secondary button6.10:1AA
Muted text8.09:1AAA
Accent7.37:1AAA
Destructive5.58:1AA
Dark mode
Text on background19.19:1AAA
Text on card19.19:1AAA
Primary button7.00:1AAA
Secondary button6.10:1AA
Muted text8.22:1AAA
Accent7.37:1AAA
Destructive3.74:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.153 0.028 118.82);
  --muted: oklch(0.917 0.023 91.608);
  --muted-foreground: oklch(0.373 0.003 91.486);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.153 0.028 118.82);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.153 0.028 118.82);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.46 0.059 120.222);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.446 0.045 91.762);
  --secondary-foreground: oklch(0.927 0.015 91.546);
  --accent: oklch(0.445 0.07 138.142);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.537 0.184 35.874);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.46 0.059 120.222);
  --chart-1: oklch(0.46 0.059 120.222);
  --chart-2: oklch(0.446 0.045 91.762);
  --chart-3: oklch(0.445 0.07 138.142);
  --chart-4: oklch(0.477 0.049 91.756);
  --chart-5: oklch(0.466 0.065 120.462);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.128 0.017 118.009);
  --foreground: oklch(0.983 0.007 117.954);
  --muted: oklch(0.272 0.029 91.735);
  --muted-foreground: oklch(0.807 0.003 91.439);
  --popover: oklch(0.128 0.017 118.009);
  --popover-foreground: oklch(0.983 0.007 117.954);
  --card: oklch(0.128 0.017 118.009);
  --card-foreground: oklch(0.983 0.007 117.954);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.46 0.059 120.222);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.446 0.045 91.762);
  --secondary-foreground: oklch(0.927 0.015 91.546);
  --accent: oklch(0.445 0.07 138.142);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.638 0.221 35.401);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.46 0.059 120.222);
  --chart-1: oklch(0.46 0.059 120.222);
  --chart-2: oklch(0.446 0.045 91.762);
  --chart-3: oklch(0.445 0.07 138.142);
  --chart-4: oklch(0.477 0.049 91.756);
  --chart-5: oklch(0.466 0.065 120.462);
}