Extra-small for shadcn/ui

Extra-small is a shadcn/ui theme built around a near-black primary color (#000000) with muted light red accents (#cababa). The light mode uses a neutral background (#fcf8f8). Dark mode keeps the near-black primary (#000000) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcf8f8snow
#000000black
Foreground
#050101black
#fbf9f9snow
Card
#faf4f4whitesmoke
#030303black
Card foreground
#000000black
#fdfcfcsnow
Popover
#faf4f4whitesmoke
#030303black
Popover foreground
#000000black
#fdfcfcsnow
Primary
#000000black
#000000black
Primary foreground
#999999darkgray
#999999darkgray
Secondary
#dbd6d6gainsboro
#272020black
Secondary foreground
#443c3cdarkslategray
#c3b6b6silver
Muted
#ebe0e0gainsboro
#1f1414black
Muted foreground
#595959dimgray
#a6a6a6darkgray
Accent
#cababasilver
#483333darkslategray
Accent foreground
#2e2323darkslategray
#ddcfcflightgrey
Destructive
#940c05darkred
#f94339tomato
Destructive foreground
#fdd0cepink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#000000black
#000000black

Contrast

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

Light mode
Text on background19.67:1AAA
Text on card19.36:1AAA
Primary button7.37:1AAA
Secondary button7.48:1AAA
Muted text5.42:1AA
Accent8.12:1AAA
Destructive6.50:1AA
Dark mode
Text on background20.02:1AAA
Text on card20.19:1AAA
Primary button7.37:1AAA
Secondary button8.11:1AAA
Muted text7.38:1AAA
Accent7.76:1AAA
Destructive3.57:1AA Large

CSS variables

Paste this into your globals.css to use Extra-small in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.004 17.231);
  --foreground: oklch(0.078 0.021 23.431);
  --muted: oklch(0.915 0.012 17.381);
  --muted-foreground: oklch(0.465 0 180);
  --popover: oklch(0.973 0.007 17.27);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.973 0.007 17.27);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0.881 0.005 17.253);
  --secondary-foreground: oklch(0.364 0.011 17.653);
  --accent: oklch(0.802 0.018 17.537);
  --accent-foreground: oklch(0.271 0.016 18.201);
  --destructive: oklch(0.424 0.167 29.611);
  --destructive-foreground: oklch(0.896 0.052 21.695);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0.881 0.005 17.253);
  --chart-3: oklch(0.802 0.018 17.537);
  --chart-4: oklch(0.905 0.004 17.231);
  --chart-5: oklch(0 0 0);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.983 0.002 17.191);
  --muted: oklch(0.205 0.019 18.789);
  --muted-foreground: oklch(0.724 0 180);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.992 0.001 17.174);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.992 0.001 17.174);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0 0 0);
  --primary-foreground: oklch(0.683 0 180);
  --secondary: oklch(0.252 0.011 17.904);
  --secondary-foreground: oklch(0.788 0.015 17.479);
  --accent: oklch(0.344 0.03 18.739);
  --accent-foreground: oklch(0.867 0.015 17.455);
  --destructive: oklch(0.651 0.22 28.043);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0 0 0);
  --chart-1: oklch(0 0 0);
  --chart-2: oklch(0.252 0.011 17.904);
  --chart-3: oklch(0.344 0.03 18.739);
  --chart-4: oklch(0.283 0.013 17.948);
  --chart-5: oklch(0 0 0);
}