Eggnog for shadcn/ui

Eggnog is a shadcn/ui theme built around a muted green primary color (#606d50) with muted violet accents (#5c506d). The light mode uses a neutral background (#fdfefb). Dark mode keeps the muted green primary (#606d50) on a green-tinted background (#0b0e06).

Color palette

TokenLightDark
Background
#fdfefbwhite
#0b0e06black
Foreground
#060802black
#f8faf5whitesmoke
Card
#fafdf7mintcream
#0d1208black
Card foreground
#030401black
#fafcf8snow
Popover
#fafdf7mintcream
#0d1208black
Popover foreground
#030401black
#fafcf8snow
Primary
#606d50dimgray
#606d50dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#5c506ddimgray
#5c506ddimgray
Secondary foreground
#f7f6f8whitesmoke
#f7f6f8whitesmoke
Muted
#efecf3whitesmoke
#0f0c13black
Muted foreground
#5e5a63dimgray
#a09ca5darkgray
Accent
#5c506ddimgray
#5c506ddimgray
Accent foreground
#f7f6f8whitesmoke
#f7f6f8whitesmoke
Destructive
#9d3410saddlebrown
#e85321chocolate
Destructive foreground
#fceae3linen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#606d50dimgray
#606d50dimgray

Contrast

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

Light mode
Text on background19.86:1AAA
Text on card20.02:1AAA
Primary button5.55:1AA
Secondary button6.88:1AA
Muted text5.76:1AA
Accent6.88:1AA
Destructive6.16:1AA
Dark mode
Text on background18.50:1AAA
Text on card18.40:1AAA
Primary button5.55:1AA
Secondary button6.88:1AA
Muted text7.21:1AAA
Accent6.88:1AA
Destructive3.69:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.004 125.796);
  --foreground: oklch(0.129 0.022 124.792);
  --muted: oklch(0.948 0.01 305.6);
  --muted-foreground: oklch(0.473 0.016 305.296);
  --popover: oklch(0.99 0.008 125.852);
  --popover-foreground: oklch(0.102 0.017 124.792);
  --card: oklch(0.99 0.008 125.852);
  --card-foreground: oklch(0.102 0.017 124.792);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.515 0.046 126.976);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.455 0.048 304.335);
  --secondary-foreground: oklch(0.975 0.003 305.696);
  --accent: oklch(0.455 0.048 304.335);
  --accent-foreground: oklch(0.975 0.003 305.696);
  --destructive: oklch(0.474 0.147 37.109);
  --destructive-foreground: oklch(0.949 0.022 39.377);
  --ring: oklch(0.515 0.046 126.976);
  --chart-1: oklch(0.515 0.046 126.976);
  --chart-2: oklch(0.455 0.048 304.335);
  --chart-3: oklch(0.455 0.048 304.335);
  --chart-4: oklch(0.48 0.051 304.32);
  --chart-5: oklch(0.521 0.054 127.212);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.157 0.018 126.329);
  --foreground: oklch(0.982 0.007 125.838);
  --muted: oklch(0.161 0.015 304.458);
  --muted-foreground: oklch(0.699 0.014 305.467);
  --popover: oklch(0.172 0.02 127.213);
  --popover-foreground: oklch(0.988 0.005 125.805);
  --card: oklch(0.172 0.02 127.213);
  --card-foreground: oklch(0.988 0.005 125.805);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.515 0.046 126.976);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.455 0.048 304.335);
  --secondary-foreground: oklch(0.975 0.003 305.696);
  --accent: oklch(0.455 0.048 304.335);
  --accent-foreground: oklch(0.975 0.003 305.696);
  --destructive: oklch(0.637 0.193 37.343);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.515 0.046 126.976);
  --chart-1: oklch(0.515 0.046 126.976);
  --chart-2: oklch(0.455 0.048 304.335);
  --chart-3: oklch(0.455 0.048 304.335);
  --chart-4: oklch(0.48 0.051 304.32);
  --chart-5: oklch(0.521 0.054 127.212);
}