Solitaire for shadcn/ui

Solitaire is a shadcn/ui theme built around a vivid green primary color (#029c21) with vivid purple accents (#9c027d). The light mode uses a neutral background (#f6fdf8). Dark mode keeps the vivid green primary (#029c21) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f6fdf8mintcream
#000000black
Foreground
#010402black
#fcfdfcwhite
Card
#f6fdf8mintcream
#000000black
Card foreground
#010402black
#fcfdfcwhite
Popover
#f6fdf8mintcream
#000000black
Popover foreground
#010402black
#fcfdfcwhite
Primary
#029c21forestgreen
#029c21forestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#9c027ddarkmagenta
#9c027ddarkmagenta
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f1dfeelavender
#200e1cblack
Muted foreground
#4e464ddarkslategray
#b9b1b8silver
Accent
#9c027ddarkmagenta
#9c027ddarkmagenta
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#b52903firebrick
#f13704orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#029c21forestgreen
#029c21forestgreen

Contrast

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

Light mode
Text on background19.98:1AAA
Text on card19.98:1AAA
Primary button3.64:1AA Large
Secondary button7.73:1AAA
Muted text7.15:1AAA
Accent7.73:1AAA
Destructive6.39:1AA
Dark mode
Text on background20.59:1AAA
Text on card20.59:1AAA
Primary button3.64:1AA Large
Secondary button7.73:1AAA
Muted text8.80:1AAA
Accent7.73:1AAA
Destructive3.96:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.01 151.851);
  --foreground: oklch(0.098 0.019 150.979);
  --muted: oklch(0.922 0.028 332.447);
  --muted-foreground: oklch(0.404 0.017 332.602);
  --popover: oklch(0.988 0.01 151.851);
  --popover-foreground: oklch(0.098 0.019 150.979);
  --card: oklch(0.988 0.01 151.851);
  --card-foreground: oklch(0.098 0.019 150.979);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.601 0.193 144.14);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.468 0.202 339.779);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.468 0.202 339.779);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.506 0.18 33.937);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.601 0.193 144.14);
  --chart-1: oklch(0.601 0.193 144.14);
  --chart-2: oklch(0.468 0.202 339.779);
  --chart-3: oklch(0.468 0.202 339.779);
  --chart-4: oklch(0.501 0.217 339.868);
  --chart-5: oklch(0.607 0.197 144.029);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.001 151.992);
  --muted: oklch(0.197 0.04 334.799);
  --muted-foreground: oklch(0.769 0.014 332.276);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.993 0.001 151.992);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.993 0.001 151.992);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.601 0.193 144.14);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.468 0.202 339.779);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.468 0.202 339.779);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.625 0.226 33.482);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.601 0.193 144.14);
  --chart-1: oklch(0.601 0.193 144.14);
  --chart-2: oklch(0.468 0.202 339.779);
  --chart-3: oklch(0.468 0.202 339.779);
  --chart-4: oklch(0.501 0.217 339.868);
  --chart-5: oklch(0.607 0.197 144.029);
}