Better Solarized Dark for shadcn/ui

Better Solarized Dark is a shadcn/ui theme built around a near-white primary color (#ffffff) with vivid deep cyan accents (#006a85). The light mode uses a cyan-tinted background (#002d38). Dark mode keeps the near-white primary (#ffffff) on a cyan-tinted background (#002d38).

Color palette

TokenLightDark
Background
#002d38darkslategray
#002d38darkslategray
Foreground
#bababasilver
#bababasilver
Card
#00252eblack
#00252eblack
Card foreground
#c7c7c7silver
#c7c7c7silver
Popover
#002129black
#002129black
Popover foreground
#d4d4d4lightgrey
#d4d4d4lightgrey
Primary
#ffffffwhite
#ffffffwhite
Primary foreground
#333333darkslategray
#333333darkslategray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#22292bdarkslategray
#22292bdarkslategray
Muted foreground
#9bacb0darkgray
#9bacb0darkgray
Accent
#006a85teal
#006a85teal
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#ed0707red
#ed0707red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#043f4edarkslategray
#043f4edarkslategray
Input
#054b5cdarkslategray
#054b5cdarkslategray
Ring
#ffffffwhite
#ffffffwhite

Contrast

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

Light mode
Text on background7.56:1AAA
Text on card9.55:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text6.28:1AA
Accent6.17:1AA
Destructive4.51:1AA
Dark mode
Text on background7.56:1AAA
Text on card9.55:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text6.28:1AA
Accent6.17:1AA
Destructive4.51:1AA

CSS variables

Paste this into your globals.css to use Better Solarized Dark in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.274 0.05 219.542);
  --foreground: oklch(0.789 0 171.254);
  --muted: oklch(0.275 0.011 214.508);
  --muted-foreground: oklch(0.733 0.02 214.424);
  --popover: oklch(0.227 0.041 217.734);
  --popover-foreground: oklch(0.869 0 165.964);
  --card: oklch(0.243 0.044 218.44);
  --card-foreground: oklch(0.829 0 180);
  --border: oklch(0.34 0.06 220.386);
  --input: oklch(0.382 0.068 220.916);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.487 0.091 222.89);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.597 0.242 29.021);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.487 0.091 222.89);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.274 0.05 219.542);
  --foreground: oklch(0.789 0 171.254);
  --muted: oklch(0.275 0.011 214.508);
  --muted-foreground: oklch(0.733 0.02 214.424);
  --popover: oklch(0.227 0.041 217.734);
  --popover-foreground: oklch(0.869 0 165.964);
  --card: oklch(0.243 0.044 218.44);
  --card-foreground: oklch(0.829 0 180);
  --border: oklch(0.34 0.06 220.386);
  --input: oklch(0.382 0.068 220.916);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.487 0.091 222.89);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.597 0.242 29.021);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.487 0.091 222.89);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}