Batter for shadcn/ui

Batter is a shadcn/ui theme built around an orange primary color (#b25334) with neutral gray accents (#dcdbdb). The light mode uses a neutral background (#fdf8f7). Dark mode keeps the orange primary (#b25334) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdf8f7snow
#000000black
Foreground
#120602black
#fdfcfcsnow
Card
#fcf5f3seashell
#030303black
Card foreground
#0e0502black
#ffffffwhite
Popover
#fdf8f7snow
#000000black
Popover foreground
#120602black
#fdfcfcsnow
Primary
#b25334sienna
#b25334sienna
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#dcdbdbgainsboro
#342b28darkslategray
Secondary foreground
#434242darkslategray
#cec3c0silver
Muted
#ecdedagainsboro
#251813black
Muted foreground
#4b4a49darkslategray
#b6b5b4silver
Accent
#dcdbdbgainsboro
#342b28darkslategray
Accent foreground
#434242darkslategray
#cec3c0silver
Destructive
#c01802firebrick
#f71f02red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b25334sienna
#b25334sienna

Contrast

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

Light mode
Text on background18.98:1AAA
Text on card18.72:1AAA
Primary button5.02:1AA
Secondary button7.24:1AAA
Muted text6.76:1AA
Accent7.24:1AAA
Destructive6.23:1AA
Dark mode
Text on background20.50:1AAA
Text on card20.67:1AAA
Primary button5.02:1AA
Secondary button8.01:1AAA
Muted text8.44:1AAA
Accent8.01:1AAA
Destructive4.06:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.005 39.472);
  --foreground: oklch(0.142 0.027 48.642);
  --muted: oklch(0.912 0.016 39.404);
  --muted-foreground: oklch(0.408 0.002 39.482);
  --popover: oklch(0.983 0.005 39.472);
  --popover-foreground: oklch(0.142 0.027 48.642);
  --card: oklch(0.975 0.008 39.454);
  --card-foreground: oklch(0.127 0.023 50.78);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.556 0.132 38.766);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.892 0.001 39.503);
  --secondary-foreground: oklch(0.38 0.001 39.482);
  --accent: oklch(0.892 0.001 39.503);
  --accent-foreground: oklch(0.38 0.001 39.482);
  --destructive: oklch(0.515 0.201 30.798);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.556 0.132 38.766);
  --chart-1: oklch(0.556 0.132 38.766);
  --chart-2: oklch(0.892 0.001 39.503);
  --chart-3: oklch(0.892 0.001 39.503);
  --chart-4: oklch(0.916 0 39.504);
  --chart-5: oklch(0.558 0.138 38.634);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 39.501);
  --muted: oklch(0.223 0.024 39.212);
  --muted-foreground: oklch(0.773 0.001 39.496);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.001 39.501);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.556 0.132 38.766);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.298 0.014 39.29);
  --secondary-foreground: oklch(0.826 0.013 39.411);
  --accent: oklch(0.298 0.014 39.29);
  --accent-foreground: oklch(0.826 0.013 39.411);
  --destructive: oklch(0.622 0.244 30.575);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.556 0.132 38.766);
  --chart-1: oklch(0.556 0.132 38.766);
  --chart-2: oklch(0.298 0.014 39.29);
  --chart-3: oklch(0.298 0.014 39.29);
  --chart-4: oklch(0.328 0.016 39.285);
  --chart-5: oklch(0.558 0.138 38.634);
}