Ecology for shadcn/ui

Ecology is a shadcn/ui theme built around a red primary color (#922641) with blue accents (#264192). The light mode uses a neutral background (#ffffff). Dark mode keeps the red primary (#922641) on a neutral background (#040102).

Color palette

TokenLightDark
Background
#ffffffwhite
#040102black
Foreground
#110407black
#fcf8f9snow
Card
#fcfcfcsnow
#080204black
Card foreground
#0d0305black
#fdfcfcsnow
Popover
#fcfcfcsnow
#080204black
Popover foreground
#0d0305black
#fdfcfcsnow
Primary
#922641brown
#922641brown
Primary foreground
#fbeff2lavenderblush
#fbeff2lavenderblush
Secondary
#419226forestgreen
#419226forestgreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dbe4d7gainsboro
#1e281bblack
Muted foreground
#40463edarkslategray
#bbc1b9silver
Accent
#264192darkslateblue
#264192darkslateblue
Accent foreground
#eff2fbaliceblue
#eff2fbaliceblue
Destructive
#930d06darkred
#f62d23orangered
Destructive foreground
#fdd0cepink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#922641brown
#922641brown

Contrast

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

Light mode
Text on background20.10:1AAA
Text on card19.90:1AAA
Primary button7.28:1AAA
Secondary button3.91:1AA Large
Muted text7.45:1AAA
Accent8.35:1AAA
Destructive6.56:1AA
Dark mode
Text on background19.71:1AAA
Text on card20.06:1AAA
Primary button7.28:1AAA
Secondary button3.91:1AA Large
Muted text8.34:1AAA
Accent8.35:1AAA
Destructive3.95:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.132 0.029 1.493);
  --muted: oklch(0.909 0.021 137.802);
  --muted-foreground: oklch(0.387 0.015 137.832);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.119 0.025 0.107);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.119 0.025 0.107);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.447 0.144 10.687);
  --primary-foreground: oklch(0.962 0.014 0.261);
  --secondary: oklch(0.587 0.163 139.152);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.403 0.138 266.301);
  --accent-foreground: oklch(0.961 0.013 271.285);
  --destructive: oklch(0.422 0.165 29.504);
  --destructive-foreground: oklch(0.896 0.051 21.675);
  --ring: oklch(0.447 0.144 10.687);
  --chart-1: oklch(0.447 0.144 10.687);
  --chart-2: oklch(0.587 0.163 139.152);
  --chart-3: oklch(0.403 0.138 266.301);
  --chart-4: oklch(0.622 0.174 139.176);
  --chart-5: oklch(0.449 0.149 11.374);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.084 0.014 359.794);
  --foreground: oklch(0.983 0.004 359.974);
  --muted: oklch(0.262 0.028 137.98);
  --muted-foreground: oklch(0.803 0.013 137.79);
  --popover: oklch(0.106 0.017 359.794);
  --popover-foreground: oklch(0.991 0.002 359.919);
  --card: oklch(0.106 0.017 359.794);
  --card-foreground: oklch(0.991 0.002 359.919);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.447 0.144 10.687);
  --primary-foreground: oklch(0.962 0.014 0.261);
  --secondary: oklch(0.587 0.163 139.152);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.403 0.138 266.301);
  --accent-foreground: oklch(0.961 0.013 271.285);
  --destructive: oklch(0.628 0.234 29.017);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.447 0.144 10.687);
  --chart-1: oklch(0.447 0.144 10.687);
  --chart-2: oklch(0.587 0.163 139.152);
  --chart-3: oklch(0.403 0.138 266.301);
  --chart-4: oklch(0.622 0.174 139.176);
  --chart-5: oklch(0.449 0.149 11.374);
}