Nutty for shadcn/ui

Nutty is a shadcn/ui theme built around a deep green primary color (#164b11) with muted light green accents (#c1cfbf). The light mode uses a neutral background (#fbfefb). Dark mode keeps the deep green primary (#164b11) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfefbwhite
#000000black
Foreground
#020901black
#ffffffwhite
Card
#fbfefbwhite
#000000black
Card foreground
#020901black
#ffffffwhite
Popover
#fbfefbwhite
#000000black
Popover foreground
#020901black
#ffffffwhite
Primary
#164b11darkgreen
#164b11darkgreen
Primary foreground
#aaeba3palegreen
#aaeba3palegreen
Secondary
#d9ded9gainsboro
#222c21darkslategray
Secondary foreground
#3f473edarkslategray
#b8c9b6silver
Muted
#d9e4d8gainsboro
#1c271bblack
Muted foreground
#3f473edarkslategray
#b9c1b8silver
Accent
#c1cfbfsilver
#2d412adarkslategray
Accent foreground
#293427darkslategray
#c6d9c4lightgrey
Destructive
#db3006orangered
#f93706orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#164b11darkgreen
#164b11darkgreen

Contrast

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

Light mode
Text on background19.85:1AAA
Text on card19.85:1AAA
Primary button7.35:1AAA
Secondary button7.05:1AAA
Muted text7.34:1AAA
Accent7.99:1AAA
Destructive4.73:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.35:1AAA
Secondary button8.33:1AAA
Muted text8.38:1AAA
Accent7.45:1AAA
Destructive3.77:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.005 142.605);
  --foreground: oklch(0.125 0.031 140.276);
  --muted: oklch(0.907 0.02 142.539);
  --muted-foreground: oklch(0.387 0.019 142.427);
  --popover: oklch(0.994 0.005 142.605);
  --popover-foreground: oklch(0.125 0.031 140.276);
  --card: oklch(0.994 0.005 142.605);
  --card-foreground: oklch(0.125 0.031 140.276);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.365 0.105 141.685);
  --primary-foreground: oklch(0.878 0.117 142.081);
  --secondary: oklch(0.895 0.008 142.589);
  --secondary-foreground: oklch(0.387 0.019 142.427);
  --accent: oklch(0.839 0.026 142.498);
  --accent-foreground: oklch(0.311 0.027 142.264);
  --destructive: oklch(0.58 0.211 33.135);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.365 0.105 141.685);
  --chart-1: oklch(0.365 0.105 141.685);
  --chart-2: oklch(0.895 0.008 142.589);
  --chart-3: oklch(0.839 0.026 142.498);
  --chart-4: oklch(0.918 0.006 142.598);
  --chart-5: oklch(0.369 0.108 141.694);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.259 0.027 142.204);
  --muted-foreground: oklch(0.803 0.016 142.547);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.365 0.105 141.685);
  --primary-foreground: oklch(0.878 0.117 142.081);
  --secondary: oklch(0.279 0.025 142.256);
  --secondary-foreground: oklch(0.817 0.032 142.465);
  --accent: oklch(0.35 0.046 142.087);
  --accent-foreground: oklch(0.865 0.034 142.467);
  --destructive: oklch(0.638 0.233 32.99);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.365 0.105 141.685);
  --chart-1: oklch(0.365 0.105 141.685);
  --chart-2: oklch(0.279 0.025 142.256);
  --chart-3: oklch(0.35 0.046 142.087);
  --chart-4: oklch(0.312 0.029 142.24);
  --chart-5: oklch(0.369 0.108 141.694);
}