Fan for shadcn/ui

Fan is a shadcn/ui theme built around a deep green primary color (#46670f) with deep green accents (#1a670f). The light mode uses a neutral background (#fdfefb). Dark mode keeps the deep green primary (#46670f) on a green-tinted background (#080b05).

Color palette

TokenLightDark
Background
#fdfefbwhite
#080b05black
Foreground
#0f1604black
#ffffffwhite
Card
#fdfefbwhite
#080b05black
Card foreground
#0f1604black
#ffffffwhite
Popover
#fdfefbwhite
#080b05black
Popover foreground
#0f1604black
#ffffffwhite
Primary
#46670fdarkolivegreen
#46670fdarkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#675b0fdarkolivegreen
#675b0fdarkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e7e5dagainsboro
#252318black
Muted foreground
#5f5d4edimgray
#b1afa0darkgray
Accent
#1a670fdarkgreen
#1a670fdarkgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#7d300dsaddlebrown
#de5617chocolate
Destructive foreground
#f9d4c3peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#46670fdarkolivegreen
#46670fdarkolivegreen

Contrast

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

Light mode
Text on background18.23:1AAA
Text on card18.23:1AAA
Primary button6.57:1AA
Secondary button6.83:1AA
Muted text5.25:1AA
Accent7.05:1AAA
Destructive6.61:1AA
Dark mode
Text on background19.83:1AAA
Text on card19.83:1AAA
Primary button6.57:1AA
Secondary button6.83:1AA
Muted text7.11:1AAA
Accent7.05:1AAA
Destructive3.86:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.004 122.99);
  --foreground: oklch(0.186 0.036 125.306);
  --muted: oklch(0.921 0.015 99.577);
  --muted-foreground: oklch(0.476 0.023 100.01);
  --popover: oklch(0.995 0.004 122.99);
  --popover-foreground: oklch(0.186 0.036 125.306);
  --card: oklch(0.995 0.004 122.99);
  --card-foreground: oklch(0.186 0.036 125.306);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.47 0.117 128.709);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.468 0.091 99.82);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.449 0.139 141.367);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.414 0.115 41.819);
  --destructive-foreground: oklch(0.896 0.047 46.335);
  --ring: oklch(0.47 0.117 128.709);
  --chart-1: oklch(0.47 0.117 128.709);
  --chart-2: oklch(0.468 0.091 99.82);
  --chart-3: oklch(0.449 0.139 141.367);
  --chart-4: oklch(0.51 0.1 99.745);
  --chart-5: oklch(0.475 0.12 128.929);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.142 0.015 122.58);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.256 0.02 100.325);
  --muted-foreground: oklch(0.751 0.021 99.741);
  --popover: oklch(0.142 0.015 122.58);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.142 0.015 122.58);
  --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.47 0.117 128.709);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.468 0.091 99.82);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.449 0.139 141.367);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.624 0.182 40.92);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.47 0.117 128.709);
  --chart-1: oklch(0.47 0.117 128.709);
  --chart-2: oklch(0.468 0.091 99.82);
  --chart-3: oklch(0.449 0.139 141.367);
  --chart-4: oklch(0.51 0.1 99.745);
  --chart-5: oklch(0.475 0.12 128.929);
}