Nervous for shadcn/ui

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

Color palette

TokenLightDark
Background
#ffffffwhite
#030104black
Foreground
#000000black
#faf8fcghostwhite
Card
#ffffffwhite
#030104black
Card foreground
#000000black
#faf8fcghostwhite
Popover
#ffffffwhite
#030104black
Popover foreground
#000000black
#faf8fcghostwhite
Primary
#121113black
#121113black
Primary foreground
#aca7afdarkgray
#aca7afdarkgray
Secondary
#111113black
#111113black
Secondary foreground
#a8a7afdarkgray
#a8a7afdarkgray
Muted
#e9e8f2lavender
#0e0d17black
Muted foreground
#424243darkslategray
#bcbcbdsilver
Accent
#131113black
#131113black
Accent foreground
#afa7aedarkgray
#afa7aedarkgray
Destructive
#8a1d0adarkred
#f04f33tomato
Destructive foreground
#fbd2cbpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#121113black
#121113black

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.98:1AAA
Secondary button7.91:1AAA
Muted text8.28:1AAA
Accent8.02:1AAA
Destructive6.72:1AA
Dark mode
Text on background19.68:1AAA
Text on card19.68:1AAA
Primary button7.98:1AAA
Secondary button7.91:1AAA
Muted text10.17:1AAA
Accent8.02:1AAA
Destructive3.57:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.935 0.013 292.272);
  --muted-foreground: oklch(0.378 0.002 292.432);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.18 0.004 313.468);
  --primary-foreground: oklch(0.734 0.013 313.494);
  --secondary: oklch(0.179 0.004 292.158);
  --secondary-foreground: oklch(0.731 0.012 292.232);
  --accent: oklch(0.18 0.004 329.97);
  --accent-foreground: oklch(0.736 0.014 329.916);
  --destructive: oklch(0.415 0.146 32.181);
  --destructive-foreground: oklch(0.897 0.047 29.747);
  --ring: oklch(0.18 0.004 313.468);
  --chart-1: oklch(0.18 0.004 313.468);
  --chart-2: oklch(0.179 0.004 292.158);
  --chart-3: oklch(0.18 0.004 329.97);
  --chart-4: oklch(0.211 0.005 292.097);
  --chart-5: oklch(0.178 0.006 313.384);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.084 0.016 315.269);
  --foreground: oklch(0.982 0.005 313.572);
  --muted: oklch(0.165 0.021 290.03);
  --muted-foreground: oklch(0.796 0.002 292.5);
  --popover: oklch(0.084 0.016 315.269);
  --popover-foreground: oklch(0.982 0.005 313.572);
  --card: oklch(0.084 0.016 315.269);
  --card-foreground: oklch(0.982 0.005 313.572);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.18 0.004 313.468);
  --primary-foreground: oklch(0.734 0.013 313.494);
  --secondary: oklch(0.179 0.004 292.158);
  --secondary-foreground: oklch(0.731 0.012 292.232);
  --accent: oklch(0.18 0.004 329.97);
  --accent-foreground: oklch(0.736 0.014 329.916);
  --destructive: oklch(0.647 0.201 32.368);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.18 0.004 313.468);
  --chart-1: oklch(0.18 0.004 313.468);
  --chart-2: oklch(0.179 0.004 292.158);
  --chart-3: oklch(0.18 0.004 329.97);
  --chart-4: oklch(0.211 0.005 292.097);
  --chart-5: oklch(0.178 0.006 313.384);
}