Acre for shadcn/ui

Acre is a shadcn/ui theme built around a green primary color (#487b23) with pink accents (#7b2348). The light mode uses a neutral background (#fafcf8). Dark mode keeps the green primary (#487b23) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fafcf8snow
#000000black
Foreground
#000000black
#ffffffwhite
Card
#fafcf8snow
#000000black
Card foreground
#000000black
#ffffffwhite
Popover
#fafcf8snow
#000000black
Popover foreground
#000000black
#ffffffwhite
Primary
#487b23darkolivegreen
#487b23darkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#23487bdarkslateblue
#23487bdarkslateblue
Secondary foreground
#dbe6f5lavender
#dbe6f5lavender
Muted
#d6dfebgainsboro
#141d29black
Muted foreground
#4e555fdimgray
#a0a7b1darkgray
Accent
#7b2348brown
#7b2348brown
Accent foreground
#f5dbe6mistyrose
#f5dbe6mistyrose
Destructive
#8d3607saddlebrown
#f36012orangered
Destructive foreground
#fcdbcabisque
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#487b23darkolivegreen
#487b23darkolivegreen

Contrast

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

Light mode
Text on background20.32:1AAA
Text on card20.32:1AAA
Primary button5.06:1AA
Secondary button7.31:1AAA
Muted text5.58:1AA
Accent7.42:1AAA
Destructive6.07:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button5.06:1AA
Secondary button7.31:1AAA
Muted text7.00:1AAA
Accent7.42:1AAA
Destructive6.48:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.006 131.776);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.9 0.019 256.727);
  --muted-foreground: oklch(0.448 0.019 256.776);
  --popover: oklch(0.988 0.006 131.776);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.006 131.776);
  --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.529 0.132 134.901);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.401 0.097 257.253);
  --secondary-foreground: oklch(0.921 0.023 256.738);
  --accent: oklch(0.406 0.126 358.933);
  --accent-foreground: oklch(0.916 0.032 350.614);
  --destructive: oklch(0.449 0.129 42.805);
  --destructive-foreground: oklch(0.915 0.044 50.085);
  --ring: oklch(0.529 0.132 134.901);
  --chart-1: oklch(0.529 0.132 134.901);
  --chart-2: oklch(0.401 0.097 257.253);
  --chart-3: oklch(0.406 0.126 358.933);
  --chart-4: oklch(0.427 0.105 257.275);
  --chart-5: oklch(0.535 0.137 135.093);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.228 0.027 256.859);
  --muted-foreground: oklch(0.725 0.017 256.732);
  --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.529 0.132 134.901);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.401 0.097 257.253);
  --secondary-foreground: oklch(0.921 0.023 256.738);
  --accent: oklch(0.406 0.126 358.933);
  --accent-foreground: oklch(0.916 0.032 350.614);
  --destructive: oklch(0.67 0.195 42.275);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.529 0.132 134.901);
  --chart-1: oklch(0.529 0.132 134.901);
  --chart-2: oklch(0.401 0.097 257.253);
  --chart-3: oklch(0.406 0.126 358.933);
  --chart-4: oklch(0.427 0.105 257.275);
  --chart-5: oklch(0.535 0.137 135.093);
}