Better Solarized Light for shadcn/ui

Better Solarized Light is a shadcn/ui theme built around a deep yellow primary color (#594c27) with vivid light yellow accents (#f8df9b). The light mode uses a yellow-tinted background (#fdf6e2). Dark mode keeps the deep yellow primary (#594c27) on a yellow-tinted background (#fdf6e2).

Color palette

TokenLightDark
Background
#fdf6e2oldlace
#fdf6e2oldlace
Foreground
#333333darkslategray
#333333darkslategray
Card
#fcf3d9papayawhip
#fcf3d9papayawhip
Card foreground
#262626darkslategray
#262626darkslategray
Popover
#fcf1d4papayawhip
#fcf1d4papayawhip
Popover foreground
#1a1a1ablack
#1a1a1ablack
Primary
#594c27darkolivegreen
#594c27darkolivegreen
Primary foreground
#e8e0cagainsboro
#e8e0cagainsboro
Secondary
#d2c8adsilver
#d2c8adsilver
Secondary foreground
#312c1bdarkslategray
#312c1bdarkslategray
Muted
#e9e7e2gainsboro
#e9e7e2gainsboro
Muted foreground
#565143darkolivegreen
#565143darkolivegreen
Accent
#f8df9bkhaki
#f8df9bkhaki
Accent foreground
#5b4406saddlebrown
#5b4406saddlebrown
Destructive
#cc0f0ffirebrick
#cc0f0ffirebrick
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#f9edcdblanchedalmond
#f9edcdblanchedalmond
Input
#f7e8c0bisque
#f7e8c0bisque
Ring
#594c27darkolivegreen
#594c27darkolivegreen

Contrast

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

Light mode
Text on background11.70:1AAA
Text on card13.66:1AAA
Primary button6.40:1AA
Secondary button8.39:1AAA
Muted text6.39:1AA
Accent7.05:1AAA
Destructive5.76:1AA
Dark mode
Text on background11.70:1AAA
Text on card13.66:1AAA
Primary button6.40:1AA
Secondary button8.39:1AAA
Muted text6.39:1AA
Accent7.05:1AAA
Destructive5.76:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.973 0.027 90.306);
  --foreground: oklch(0.321 0 180);
  --muted: oklch(0.928 0.006 90.172);
  --muted-foreground: oklch(0.435 0.022 90.405);
  --popover: oklch(0.96 0.04 90.373);
  --popover-foreground: oklch(0.216 0 180);
  --card: oklch(0.964 0.036 90.353);
  --card-foreground: oklch(0.27 0 180);
  --border: oklch(0.947 0.043 90.388);
  --input: oklch(0.933 0.055 90.422);
  --primary: oklch(0.421 0.057 91.41);
  --primary-foreground: oklch(0.907 0.031 91.668);
  --secondary: oklch(0.835 0.039 91.736);
  --secondary-foreground: oklch(0.293 0.029 91.773);
  --accent: oklch(0.909 0.091 90.341);
  --accent-foreground: oklch(0.401 0.079 86.024);
  --destructive: oklch(0.535 0.213 28.595);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.421 0.057 91.41);
  --chart-1: oklch(0.421 0.057 91.41);
  --chart-2: oklch(0.835 0.039 91.736);
  --chart-3: oklch(0.909 0.091 90.341);
  --chart-4: oklch(0.855 0.034 91.702);
  --chart-5: oklch(0.425 0.06 91.275);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.973 0.027 90.306);
  --foreground: oklch(0.321 0 180);
  --muted: oklch(0.928 0.006 90.172);
  --muted-foreground: oklch(0.435 0.022 90.405);
  --popover: oklch(0.96 0.04 90.373);
  --popover-foreground: oklch(0.216 0 180);
  --card: oklch(0.964 0.036 90.353);
  --card-foreground: oklch(0.27 0 180);
  --border: oklch(0.947 0.043 90.388);
  --input: oklch(0.933 0.055 90.422);
  --primary: oklch(0.421 0.057 91.41);
  --primary-foreground: oklch(0.907 0.031 91.668);
  --secondary: oklch(0.835 0.039 91.736);
  --secondary-foreground: oklch(0.293 0.029 91.773);
  --accent: oklch(0.909 0.091 90.341);
  --accent-foreground: oklch(0.401 0.079 86.024);
  --destructive: oklch(0.535 0.213 28.595);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.421 0.057 91.41);
  --chart-1: oklch(0.421 0.057 91.41);
  --chart-2: oklch(0.835 0.039 91.736);
  --chart-3: oklch(0.909 0.091 90.341);
  --chart-4: oklch(0.855 0.034 91.702);
  --chart-5: oklch(0.425 0.06 91.275);
}