Shorts for shadcn/ui

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

Color palette

TokenLightDark
Background
#fcfdfdwhite
#000000black
Foreground
#000000black
#f6f9f8whitesmoke
Card
#f8fcfbmintcream
#030303black
Card foreground
#000000black
#f9fbfamintcream
Popover
#fcfdfdwhite
#000000black
Popover foreground
#000000black
#f6f9f8whitesmoke
Primary
#020303black
#020303black
Primary foreground
#79bea9mediumaquamarine
#79bea9mediumaquamarine
Secondary
#030202black
#030202black
Secondary foreground
#be798erosybrown
#be798erosybrown
Muted
#e7d0d7gainsboro
#2f181fblack
Muted foreground
#473e40darkslategray
#c1b8bbsilver
Accent
#030202black
#030202black
Accent foreground
#be798erosybrown
#be798erosybrown
Destructive
#670c09maroon
#ee403atomato
Destructive foreground
#f8adablightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#020303black
#020303black

Contrast

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

Light mode
Text on background20.63:1AAA
Text on card20.27:1AAA
Primary button9.57:1AAA
Secondary button6.23:1AA
Muted text7.07:1AAA
Accent6.23:1AA
Destructive7.06:1AAA
Dark mode
Text on background19.82:1AAA
Text on card19.89:1AAA
Primary button9.57:1AAA
Secondary button6.23:1AA
Muted text8.50:1AAA
Accent6.23:1AA
Destructive3.87:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 176.596);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.878 0.027 357.527);
  --muted-foreground: oklch(0.373 0.014 357.685);
  --popover: oklch(0.994 0.002 176.596);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.987 0.004 176.532);
  --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.096 0.008 176.779);
  --primary-foreground: oklch(0.75 0.077 173.15);
  --secondary: oklch(0.087 0.009 356.499);
  --secondary-foreground: oklch(0.654 0.091 0.462);
  --accent: oklch(0.087 0.009 356.499);
  --accent-foreground: oklch(0.654 0.091 0.462);
  --destructive: oklch(0.332 0.124 28.52);
  --destructive-foreground: oklch(0.818 0.088 21.366);
  --ring: oklch(0.096 0.008 176.779);
  --chart-1: oklch(0.096 0.008 176.779);
  --chart-2: oklch(0.087 0.009 356.499);
  --chart-3: oklch(0.087 0.009 356.499);
  --chart-4: oklch(0.138 0.015 357.567);
  --chart-5: oklch(0.097 0.008 176.788);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.979 0.003 176.571);
  --muted: oklch(0.244 0.038 0.952);
  --muted-foreground: oklch(0.791 0.011 357.062);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.979 0.003 176.571);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.986 0.002 176.6);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.096 0.008 176.779);
  --primary-foreground: oklch(0.75 0.077 173.15);
  --secondary: oklch(0.087 0.009 356.499);
  --secondary-foreground: oklch(0.654 0.091 0.462);
  --accent: oklch(0.087 0.009 356.499);
  --accent-foreground: oklch(0.654 0.091 0.462);
  --destructive: oklch(0.63 0.211 27.224);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.096 0.008 176.779);
  --chart-1: oklch(0.096 0.008 176.779);
  --chart-2: oklch(0.087 0.009 356.499);
  --chart-3: oklch(0.087 0.009 356.499);
  --chart-4: oklch(0.138 0.015 357.567);
  --chart-5: oklch(0.097 0.008 176.788);
}