Allied Black for shadcn/ui

Allied Black is a shadcn/ui theme built around a near-black primary color (#000000) with near-black accents (#000000). The light mode uses a neutral background (#fbf8fc). Dark mode keeps the near-black primary (#252525) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbf8fcghostwhite
#000000black
Foreground
#000000black
#ffffffwhite
Card
#fbf8fcghostwhite
#000000black
Card foreground
#000000black
#ffffffwhite
Popover
#fbf8fcghostwhite
#151515black
Popover foreground
#000000black
#ffffffwhite
Primary
#000000black
#252525darkslategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#313131darkslategray
#4e4e4edarkslategray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#edededwhitesmoke
#212121black
Muted foreground
#565658dimgray
#ffffffwhite
Accent
#000000black
#969696darkgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#ffbbb2lightpink
#ffffffwhite
Destructive foreground
#ff0000red
#ffffffwhite
Border
#e6e4e7gainsboro
#636363dimgray
Input
#e6e4e7gainsboro
#bebebesilver
Ring
#bf00ffdarkviolet
#ffffffwhite

Contrast

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

Light mode
Text on background19.88:1AAA
Text on card19.88:1AAA
Primary button21.00:1AAA
Secondary button13.00:1AAA
Muted text6.27:1AA
Accent21.00:1AAA
Destructive2.48:1Fail
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button15.27:1AAA
Secondary button8.34:1AAA
Muted text16.03:1AAA
Accent2.94:1Fail
Destructive1.00:1Fail

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.007 317.751);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.947 0 158.199);
  --muted-foreground: oklch(0.454 0.003 297.714);
  --popover: oklch(0.982 0.007 317.751);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.982 0.007 317.751);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.921 0.005 317.755);
  --input: oklch(0.921 0.005 317.755);
  --primary: oklch(0 0 0);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.313 0 167.471);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0 0 0);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.853 0.08 28.047);
  --destructive-foreground: oklch(0.628 0.258 29.234);
  --ring: oklch(0.61 0.303 313.012);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0.313 0 167.471);
  --chart-3: oklch(0 0 0);
  --chart-4: oklch(0.343 0 180);
  --chart-5: oklch(0 0 0);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.249 0 180);
  --muted-foreground: oklch(1 0 180);
  --popover: oklch(0.195 0 171.254);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.501 0 180);
  --input: oklch(0.8 0 180);
  --primary: oklch(0.266 0 180);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.423 0 180);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.674 0 180);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(1 0 180);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(0.266 0 180);
  --chart-2: oklch(0.423 0 180);
  --chart-3: oklch(0.674 0 180);
  --chart-4: oklch(0.451 0 190.305);
  --chart-5: oklch(0.264 0.005 317.733);
}