All for shadcn/ui

All is a shadcn/ui theme built around a near-black primary color (#030202) with neutral gray accents (#d1cdcc). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#030202) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#150905black
#fdfcfcsnow
Card
#ffffffwhite
#000000black
Card foreground
#150905black
#fdfcfcsnow
Popover
#ffffffwhite
#000000black
Popover foreground
#150905black
#fdfcfcsnow
Primary
#030202black
#030202black
Primary foreground
#bc8c7brosybrown
#bc8c7brosybrown
Secondary
#d1cdcclightgrey
#241c19black
Secondary foreground
#393432darkslategray
#c5b1aasilver
Muted
#f1ebe9linen
#16100eblack
Muted foreground
#524a47darkslategray
#b8b0addarkgray
Accent
#d1cdcclightgrey
#241c19black
Accent foreground
#393432darkslategray
#c5b1aasilver
Destructive
#ab2612firebrick
#e7381dorangered
Destructive foreground
#fef3f1seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#030202black
#030202black

Contrast

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

Light mode
Text on background19.56:1AAA
Text on card19.56:1AAA
Primary button7.07:1AAA
Secondary button7.79:1AAA
Muted text7.34:1AAA
Accent7.79:1AAA
Destructive6.39:1AA
Dark mode
Text on background20.50:1AAA
Text on card20.50:1AAA
Primary button7.07:1AAA
Secondary button8.15:1AAA
Muted text8.84:1AAA
Accent8.15:1AAA
Destructive4.21:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.156 0.023 44.937);
  --muted: oklch(0.945 0.007 41.25);
  --muted-foreground: oklch(0.416 0.012 41.113);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.156 0.023 44.937);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.156 0.023 44.937);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.09 0.006 45.357);
  --primary-foreground: oklch(0.683 0.064 40.864);
  --secondary: oklch(0.852 0.005 41.256);
  --secondary-foreground: oklch(0.33 0.007 41.146);
  --accent: oklch(0.852 0.005 41.256);
  --accent-foreground: oklch(0.33 0.007 41.146);
  --destructive: oklch(0.485 0.172 31.619);
  --destructive-foreground: oklch(0.971 0.012 27.997);
  --ring: oklch(0.09 0.006 45.357);
  --chart-1: oklch(0.09 0.006 45.357);
  --chart-2: oklch(0.852 0.005 41.256);
  --chart-3: oklch(0.852 0.005 41.256);
  --chart-4: oklch(0.876 0.004 41.265);
  --chart-5: oklch(0.09 0.007 45.781);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 41.299);
  --muted: oklch(0.18 0.01 40.981);
  --muted-foreground: oklch(0.763 0.01 41.206);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.001 41.299);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.992 0.001 41.299);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.09 0.006 45.357);
  --primary-foreground: oklch(0.683 0.064 40.864);
  --secondary: oklch(0.235 0.015 40.958);
  --secondary-foreground: oklch(0.776 0.025 41.088);
  --accent: oklch(0.235 0.015 40.958);
  --accent-foreground: oklch(0.776 0.025 41.088);
  --destructive: oklch(0.609 0.215 31.624);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.09 0.006 45.357);
  --chart-1: oklch(0.09 0.006 45.357);
  --chart-2: oklch(0.235 0.015 40.958);
  --chart-3: oklch(0.235 0.015 40.958);
  --chart-4: oklch(0.267 0.018 40.943);
  --chart-5: oklch(0.09 0.007 45.781);
}