Firm for shadcn/ui

Firm is a shadcn/ui theme built around an indigo primary color (#32277c) with green accents (#277c32). The light mode uses a neutral background (#ffffff). Dark mode keeps the indigo primary (#32277c) on a neutral background (#030307).

Color palette

TokenLightDark
Background
#ffffffwhite
#030307black
Foreground
#04030cblack
#f9f9fbghostwhite
Card
#fcfcfcsnow
#05040bblack
Card foreground
#030208black
#fcfcfdwhite
Popover
#fcfcfcsnow
#05040bblack
Popover foreground
#030208black
#fcfcfdwhite
Primary
#32277cmidnightblue
#32277cmidnightblue
Primary foreground
#e3e0f5lavender
#e3e0f5lavender
Secondary
#7c3227saddlebrown
#7c3227saddlebrown
Secondary foreground
#f5e3e0mistyrose
#f5e3e0mistyrose
Muted
#eee8e8linen
#171211black
Muted foreground
#574947darkslategray
#b8aaa8darkgray
Accent
#277c32forestgreen
#277c32forestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#75190bmaroon
#db2f14firebrick
Destructive foreground
#f8c1b9lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#32277cmidnightblue
#32277cmidnightblue

Contrast

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

Light mode
Text on background20.51:1AAA
Text on card20.22:1AAA
Primary button9.43:1AAA
Secondary button7.20:1AAA
Muted text7.09:1AAA
Accent5.22:1AA
Destructive7.02:1AAA
Dark mode
Text on background19.58:1AAA
Text on card19.89:1AAA
Primary button9.43:1AAA
Secondary button7.20:1AAA
Muted text8.25:1AAA
Accent5.22:1AA
Destructive4.73:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.109 0.026 290.136);
  --muted: oklch(0.936 0.006 27.965);
  --muted-foreground: oklch(0.42 0.019 28.23);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.095 0.022 290.284);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.095 0.022 290.284);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.343 0.137 282.47);
  --primary-foreground: oklch(0.915 0.029 291.946);
  --secondary: oklch(0.419 0.105 30.825);
  --secondary-foreground: oklch(0.929 0.021 28.058);
  --accent: oklch(0.519 0.136 145.481);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.37 0.128 31.652);
  --destructive-foreground: oklch(0.859 0.065 28.506);
  --ring: oklch(0.343 0.137 282.47);
  --chart-1: oklch(0.343 0.137 282.47);
  --chart-2: oklch(0.419 0.105 30.825);
  --chart-3: oklch(0.519 0.136 145.481);
  --chart-4: oklch(0.446 0.113 30.864);
  --chart-5: oklch(0.34 0.144 281.59);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.101 0.017 290.983);
  --foreground: oklch(0.983 0.002 292.502);
  --muted: oklch(0.189 0.009 28.248);
  --muted-foreground: oklch(0.749 0.016 28.055);
  --popover: oklch(0.115 0.019 290.937);
  --popover-foreground: oklch(0.992 0.001 292.523);
  --card: oklch(0.115 0.019 290.937);
  --card-foreground: oklch(0.992 0.001 292.523);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.343 0.137 282.47);
  --primary-foreground: oklch(0.915 0.029 291.946);
  --secondary: oklch(0.419 0.105 30.825);
  --secondary-foreground: oklch(0.929 0.021 28.058);
  --accent: oklch(0.519 0.136 145.481);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.581 0.211 31.526);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.343 0.137 282.47);
  --chart-1: oklch(0.343 0.137 282.47);
  --chart-2: oklch(0.419 0.105 30.825);
  --chart-3: oklch(0.519 0.136 145.481);
  --chart-4: oklch(0.446 0.113 30.864);
  --chart-5: oklch(0.34 0.144 281.59);
}