Battery for shadcn/ui

Battery is a shadcn/ui theme built around a teal primary color (#5cc3c7) with muted teal accents (#aec5c6). The light mode uses a neutral background (#fbfefe). Dark mode keeps the teal primary (#5cc3c7) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfefewhite
#000000black
Foreground
#020808black
#ffffffwhite
Card
#fbfefewhite
#000000black
Card foreground
#020808black
#ffffffwhite
Popover
#fbfefewhite
#000000black
Popover foreground
#020808black
#ffffffwhite
Primary
#5cc3c7mediumturquoise
#5cc3c7mediumturquoise
Primary foreground
#000000black
#000000black
Secondary
#c9d4d4lightgrey
#1b1d1dblack
Secondary foreground
#2f3c3cdarkslategray
#b4b6b7silver
Muted
#d7e4e4gainsboro
#1b2728darkslategray
Muted foreground
#5e6e6edimgray
#91a1a1darkgray
Accent
#aec5c6silver
#282f2fdarkslategray
Accent foreground
#1c2627darkslategray
#c0c9c9silver
Destructive
#852100maroon
#fa3e00orangered
Destructive foreground
#ffc9b8peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5cc3c7mediumturquoise
#5cc3c7mediumturquoise

Contrast

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

Light mode
Text on background19.87:1AAA
Text on card19.87:1AAA
Primary button10.12:1AAA
Secondary button7.55:1AAA
Muted text4.10:1AA Large
Accent8.56:1AAA
Destructive6.46:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button10.12:1AAA
Secondary button8.33:1AAA
Muted text5.70:1AA
Accent8.12:1AAA
Destructive3.64:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 199.563);
  --foreground: oklch(0.125 0.013 197.679);
  --muted: oklch(0.909 0.014 199.403);
  --muted-foreground: oklch(0.524 0.019 199.138);
  --popover: oklch(0.994 0.003 199.563);
  --popover-foreground: oklch(0.125 0.013 197.679);
  --card: oklch(0.994 0.003 199.563);
  --card-foreground: oklch(0.125 0.013 197.679);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.759 0.096 198.38);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.861 0.012 199.415);
  --secondary-foreground: oklch(0.343 0.016 199.005);
  --accent: oklch(0.807 0.025 199.208);
  --accent-foreground: oklch(0.26 0.015 198.888);
  --destructive: oklch(0.408 0.14 36.074);
  --destructive-foreground: oklch(0.88 0.066 39.239);
  --ring: oklch(0.759 0.096 198.38);
  --chart-1: oklch(0.759 0.096 198.38);
  --chart-2: oklch(0.861 0.012 199.415);
  --chart-3: oklch(0.807 0.025 199.208);
  --chart-4: oklch(0.884 0.01 199.449);
  --chart-5: oklch(0.766 0.1 198.371);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.263 0.018 198.799);
  --muted-foreground: oklch(0.695 0.018 199.267);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.759 0.096 198.38);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.228 0.002 199.507);
  --secondary-foreground: oklch(0.775 0.003 199.549);
  --accent: oklch(0.297 0.009 199.196);
  --accent-foreground: oklch(0.828 0.01 199.443);
  --destructive: oklch(0.646 0.229 34.517);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.759 0.096 198.38);
  --chart-1: oklch(0.759 0.096 198.38);
  --chart-2: oklch(0.228 0.002 199.507);
  --chart-3: oklch(0.297 0.009 199.196);
  --chart-4: oklch(0.26 0.002 199.499);
  --chart-5: oklch(0.766 0.1 198.371);
}