Farmer for shadcn/ui

Farmer is a shadcn/ui theme built around a neutral gray primary color (#9b9c9d) with neutral gray accents (#d1d6d6). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#9b9c9d) on a cyan-tinted background (#040f10).

Color palette

TokenLightDark
Background
#ffffffwhite
#040f10black
Foreground
#010404black
#ffffffwhite
Card
#fcfcfcsnow
#051314black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#040f10black
Popover foreground
#010404black
#ffffffwhite
Primary
#9b9c9ddarkgray
#9b9c9ddarkgray
Primary foreground
#030303black
#030303black
Secondary
#d1d6d6lightgrey
#293b3ddarkslategray
Secondary foreground
#373d3edarkslategray
#c2d4d6lightgrey
Muted
#d9ebedlavender
#122426black
Muted foreground
#484b4bdarkslategray
#b4b6b7silver
Accent
#d1d6d6lightgrey
#293b3ddarkslategray
Accent foreground
#373d3edarkslategray
#c2d4d6lightgrey
Destructive
#b63b02firebrick
#e34a02orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9b9c9ddarkgray
#9b9c9ddarkgray

Contrast

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

Light mode
Text on background20.57:1AAA
Text on card20.54:1AAA
Primary button7.51:1AAA
Secondary button7.51:1AAA
Muted text7.16:1AAA
Accent7.51:1AAA
Destructive5.82:1AA
Dark mode
Text on background19.42:1AAA
Text on card18.95:1AAA
Primary button7.51:1AAA
Secondary button7.64:1AAA
Muted text7.87:1AAA
Accent7.64:1AAA
Destructive4.00:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.098 0.012 202.032);
  --muted: oklch(0.928 0.02 204.84);
  --muted-foreground: oklch(0.411 0.004 204.925);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.098 0.012 202.032);
  --card: oklch(0.992 0 161.565);
  --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.692 0.002 204.966);
  --primary-foreground: oklch(0.092 0 204.928);
  --secondary: oklch(0.872 0.005 204.945);
  --secondary-foreground: oklch(0.356 0.009 204.825);
  --accent: oklch(0.872 0.005 204.945);
  --accent-foreground: oklch(0.356 0.009 204.825);
  --destructive: oklch(0.525 0.168 38.851);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.692 0.002 204.966);
  --chart-1: oklch(0.692 0.002 204.966);
  --chart-2: oklch(0.872 0.005 204.945);
  --chart-3: oklch(0.872 0.005 204.945);
  --chart-4: oklch(0.895 0.004 204.954);
  --chart-5: oklch(0.696 0.008 204.902);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.158 0.017 203.793);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.247 0.025 204.791);
  --muted-foreground: oklch(0.775 0.003 204.96);
  --popover: oklch(0.158 0.017 203.793);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.173 0.02 204.367);
  --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.692 0.002 204.966);
  --primary-foreground: oklch(0.092 0 204.928);
  --secondary: oklch(0.338 0.024 204.685);
  --secondary-foreground: oklch(0.857 0.02 204.829);
  --accent: oklch(0.338 0.024 204.685);
  --accent-foreground: oklch(0.857 0.02 204.829);
  --destructive: oklch(0.618 0.2 38.308);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.692 0.002 204.966);
  --chart-1: oklch(0.692 0.002 204.966);
  --chart-2: oklch(0.338 0.024 204.685);
  --chart-3: oklch(0.338 0.024 204.685);
  --chart-4: oklch(0.37 0.027 204.686);
  --chart-5: oklch(0.696 0.008 204.902);
}