Formicarium for shadcn/ui

Formicarium is a shadcn/ui theme built around a muted indigo primary color (#4b4c58) with muted yellow accents (#58584b). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted indigo primary (#4b4c58) on an indigo-tinted background (#04040b).

Color palette

TokenLightDark
Background
#ffffffwhite
#04040bblack
Foreground
#02020eblack
#fbfcfdwhite
Card
#fcfcfcsnow
#05050fblack
Card foreground
#010109black
#ffffffwhite
Popover
#fcfcfcsnow
#05050fblack
Popover foreground
#010109black
#ffffffwhite
Primary
#4b4c58darkslategray
#4b4c58darkslategray
Primary foreground
#e9e9eclavender
#e9e9eclavender
Secondary
#58584bdarkolivegreen
#58584bdarkolivegreen
Secondary foreground
#ecece9linen
#ecece9linen
Muted
#f1f0e5linen
#1a1a0eblack
Muted foreground
#555553dimgray
#acacaadarkgray
Accent
#58584bdarkolivegreen
#58584bdarkolivegreen
Accent foreground
#ecece9linen
#ecece9linen
Destructive
#cd3e0afirebrick
#e5450borangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4b4c58darkslategray
#4b4c58darkslategray

Contrast

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

Light mode
Text on background20.63:1AAA
Text on card20.35:1AAA
Primary button7.04:1AAA
Secondary button6.10:1AA
Muted text6.52:1AA
Accent6.10:1AA
Destructive4.91:1AA
Dark mode
Text on background19.89:1AAA
Text on card20.24:1AAA
Primary button7.04:1AAA
Secondary button6.10:1AA
Muted text7.70:1AAA
Accent6.10:1AA
Destructive4.05:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.098 0.035 274.884);
  --muted: oklch(0.953 0.015 105.083);
  --muted-foreground: oklch(0.449 0.003 104.909);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.085 0.03 274.978);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.085 0.03 274.978);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.419 0.021 283.894);
  --primary-foreground: oklch(0.935 0.004 284.728);
  --secondary: oklch(0.456 0.02 105.543);
  --secondary-foreground: oklch(0.943 0.004 104.886);
  --accent: oklch(0.456 0.02 105.543);
  --accent-foreground: oklch(0.943 0.004 104.886);
  --destructive: oklch(0.568 0.187 36.584);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.419 0.021 283.894);
  --chart-1: oklch(0.419 0.021 283.894);
  --chart-2: oklch(0.456 0.02 105.543);
  --chart-3: oklch(0.456 0.02 105.543);
  --chart-4: oklch(0.485 0.021 105.552);
  --chart-5: oklch(0.412 0.029 283.5);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.113 0.021 280.409);
  --foreground: oklch(0.99 0.003 284.763);
  --muted: oklch(0.214 0.021 106.371);
  --muted-foreground: oklch(0.743 0.002 104.862);
  --popover: oklch(0.124 0.024 280.304);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.124 0.024 280.304);
  --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.419 0.021 283.894);
  --primary-foreground: oklch(0.935 0.004 284.728);
  --secondary: oklch(0.456 0.02 105.543);
  --secondary-foreground: oklch(0.943 0.004 104.886);
  --accent: oklch(0.456 0.02 105.543);
  --accent-foreground: oklch(0.943 0.004 104.886);
  --destructive: oklch(0.616 0.205 36.43);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.419 0.021 283.894);
  --chart-1: oklch(0.419 0.021 283.894);
  --chart-2: oklch(0.456 0.02 105.543);
  --chart-3: oklch(0.456 0.02 105.543);
  --chart-4: oklch(0.485 0.021 105.552);
  --chart-5: oklch(0.412 0.029 283.5);
}