Brown for shadcn/ui

Brown is a shadcn/ui theme built around a near-black primary color (#111312) with near-black accents (#131112). The light mode uses a neutral background (#fbfefc). Dark mode keeps the near-black primary (#111312) on a green-tinted background (#041008).

Color palette

TokenLightDark
Background
#fbfefcwhite
#041008black
Foreground
#020d06black
#f8fcf9mintcream
Card
#f7fdf9mintcream
#06140ablack
Card foreground
#020904black
#fcfdfcwhite
Popover
#fbfefcwhite
#041008black
Popover foreground
#020d06black
#f8fcf9mintcream
Primary
#111312black
#111312black
Primary foreground
#a7aeaadarkgray
#a7aeaadarkgray
Secondary
#131112black
#131112black
Secondary foreground
#aea7acdarkgray
#aea7acdarkgray
Muted
#e2d0dcgainsboro
#2f1d29darkslategray
Muted foreground
#65535fdimgray
#ac9aa6darkgray
Accent
#131112black
#131112black
Accent foreground
#aea7acdarkgray
#aea7acdarkgray
Destructive
#cd5713chocolate
#ed7f40coral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#111312black
#111312black

Contrast

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

Light mode
Text on background19.46:1AAA
Text on card19.53:1AAA
Primary button8.26:1AAA
Secondary button7.99:1AAA
Muted text4.82:1AA
Accent7.99:1AAA
Destructive4.20:1AA Large
Dark mode
Text on background18.72:1AAA
Text on card18.53:1AAA
Primary button8.26:1AAA
Secondary button7.99:1AAA
Muted text5.94:1AA
Accent7.99:1AAA
Destructive7.73:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.005 157.172);
  --foreground: oklch(0.143 0.025 156.502);
  --muted: oklch(0.875 0.025 337.83);
  --muted-foreground: oklch(0.464 0.031 338.544);
  --popover: oklch(0.994 0.005 157.172);
  --popover-foreground: oklch(0.143 0.025 156.502);
  --card: oklch(0.988 0.009 157.078);
  --card-foreground: oklch(0.125 0.022 156.85);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.183 0.003 156.931);
  --primary-foreground: oklch(0.745 0.01 156.993);
  --secondary: oklch(0.18 0.003 337.598);
  --secondary-foreground: oklch(0.737 0.01 337.536);
  --accent: oklch(0.18 0.003 337.598);
  --accent-foreground: oklch(0.737 0.01 337.536);
  --destructive: oklch(0.601 0.166 44.448);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.183 0.003 156.931);
  --chart-1: oklch(0.183 0.003 156.931);
  --chart-2: oklch(0.18 0.003 337.598);
  --chart-3: oklch(0.18 0.003 337.598);
  --chart-4: oklch(0.214 0.004 337.648);
  --chart-5: oklch(0.184 0.005 156.679);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.158 0.025 155.631);
  --foreground: oklch(0.987 0.005 157.167);
  --muted: oklch(0.26 0.034 339.718);
  --muted-foreground: oklch(0.706 0.028 338.032);
  --popover: oklch(0.158 0.025 155.631);
  --popover-foreground: oklch(0.987 0.005 157.167);
  --card: oklch(0.174 0.029 154.286);
  --card-foreground: oklch(0.993 0.002 157.217);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.183 0.003 156.931);
  --primary-foreground: oklch(0.745 0.01 156.993);
  --secondary: oklch(0.18 0.003 337.598);
  --secondary-foreground: oklch(0.737 0.01 337.536);
  --accent: oklch(0.18 0.003 337.598);
  --accent-foreground: oklch(0.737 0.01 337.536);
  --destructive: oklch(0.71 0.155 48.251);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.183 0.003 156.931);
  --chart-1: oklch(0.183 0.003 156.931);
  --chart-2: oklch(0.18 0.003 337.598);
  --chart-3: oklch(0.18 0.003 337.598);
  --chart-4: oklch(0.214 0.004 337.648);
  --chart-5: oklch(0.184 0.005 156.679);
}