Batting for shadcn/ui

Batting is a shadcn/ui theme built around a near-black primary color (#010404) with near-black accents (#040401). The light mode uses a neutral background (#fcfdfd). Dark mode keeps the near-black primary (#010404) on a cyan-tinted background (#050e0f).

Color palette

TokenLightDark
Background
#fcfdfdwhite
#050e0fblack
Foreground
#020809black
#f9fafbghostwhite
Card
#fcfdfdwhite
#050e0fblack
Card foreground
#020809black
#f9fafbghostwhite
Popover
#fcfdfdwhite
#050e0fblack
Popover foreground
#020809black
#f9fafbghostwhite
Primary
#010404black
#010404black
Primary foreground
#69c6cemediumturquoise
#69c6cemediumturquoise
Secondary
#040104black
#040104black
Secondary foreground
#ce69c6orchid
#ce69c6orchid
Muted
#ece4eblavender
#1b131ablack
Muted foreground
#6b616adimgray
#9e949ddarkgray
Accent
#040401black
#040401black
Accent foreground
#959e33yellowgreen
#959e33yellowgreen
Destructive
#972107darkred
#f4360borangered
Destructive foreground
#fddbd3antiquewhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#010404black
#010404black

Contrast

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

Light mode
Text on background19.80:1AAA
Text on card19.80:1AAA
Primary button10.37:1AAA
Secondary button6.38:1AA
Muted text4.76:1AA
Accent7.06:1AAA
Destructive6.39:1AA
Dark mode
Text on background18.63:1AAA
Text on card18.63:1AAA
Primary button10.37:1AAA
Secondary button6.38:1AA
Muted text6.21:1AA
Accent7.06:1AAA
Destructive3.91:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 203.564);
  --foreground: oklch(0.125 0.015 200.753);
  --muted: oklch(0.927 0.013 328.206);
  --muted-foreground: oklch(0.505 0.019 328.456);
  --popover: oklch(0.993 0.002 203.564);
  --popover-foreground: oklch(0.125 0.015 200.753);
  --card: oklch(0.993 0.002 203.564);
  --card-foreground: oklch(0.125 0.015 200.753);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.097 0.009 201.281);
  --primary-foreground: oklch(0.772 0.089 203.241);
  --secondary: oklch(0.086 0.018 329.261);
  --secondary-foreground: oklch(0.67 0.171 330.473);
  --accent: oklch(0.103 0.013 111.631);
  --accent-foreground: oklch(0.671 0.129 113.954);
  --destructive: oklch(0.444 0.157 33.19);
  --destructive-foreground: oklch(0.917 0.04 32.733);
  --ring: oklch(0.097 0.009 201.281);
  --chart-1: oklch(0.097 0.009 201.281);
  --chart-2: oklch(0.086 0.018 329.261);
  --chart-3: oklch(0.103 0.013 111.631);
  --chart-4: oklch(0.139 0.029 329.785);
  --chart-5: oklch(0.098 0.01 201.177);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.156 0.015 202.478);
  --foreground: oklch(0.986 0.001 203.568);
  --muted: oklch(0.2 0.019 328.99);
  --muted-foreground: oklch(0.678 0.018 328.337);
  --popover: oklch(0.156 0.015 202.478);
  --popover-foreground: oklch(0.986 0.001 203.568);
  --card: oklch(0.156 0.015 202.478);
  --card-foreground: oklch(0.986 0.001 203.568);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.097 0.009 201.281);
  --primary-foreground: oklch(0.772 0.089 203.241);
  --secondary: oklch(0.086 0.018 329.261);
  --secondary-foreground: oklch(0.67 0.171 330.473);
  --accent: oklch(0.103 0.013 111.631);
  --accent-foreground: oklch(0.671 0.129 113.954);
  --destructive: oklch(0.629 0.229 32.742);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.097 0.009 201.281);
  --chart-1: oklch(0.097 0.009 201.281);
  --chart-2: oklch(0.086 0.018 329.261);
  --chart-3: oklch(0.103 0.013 111.631);
  --chart-4: oklch(0.139 0.029 329.785);
  --chart-5: oklch(0.098 0.01 201.177);
}