Spinel for shadcn/ui

Spinel is a shadcn/ui theme built around a light indigo primary color (#d0cbf1) with neutral gray accents (#545454). The light mode uses a neutral background (#2e2e2e). Dark mode keeps the light indigo primary (#d0cbf1) on a neutral background (#2e2e2e).

Color palette

TokenLightDark
Background
#2e2e2edarkslategray
#2e2e2edarkslategray
Foreground
#d0cbf1thistle
#d0cbf1thistle
Card
#292929darkslategray
#292929darkslategray
Card foreground
#e2dff6lavender
#e2dff6lavender
Popover
#262626darkslategray
#262626darkslategray
Popover foreground
#f4f3fcghostwhite
#f4f3fcghostwhite
Primary
#d0cbf1thistle
#d0cbf1thistle
Primary foreground
#281e6cmidnightblue
#281e6cmidnightblue
Secondary
#322d53darkslategray
#322d53darkslategray
Secondary foreground
#d0cde4lightgrey
#d0cde4lightgrey
Muted
#3f3131darkslategray
#3f3131darkslategray
Muted foreground
#c0afafsilver
#c0afafsilver
Accent
#545454dimgray
#545454dimgray
Accent foreground
#edededwhitesmoke
#edededwhitesmoke
Destructive
#e20b03red
#e20b03red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#3b3b3bdarkslategray
#3b3b3bdarkslategray
Input
#424242darkslategray
#424242darkslategray
Ring
#d0cbf1thistle
#d0cbf1thistle

Contrast

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

Light mode
Text on background8.73:1AAA
Text on card11.19:1AAA
Primary button9.03:1AAA
Secondary button8.31:1AAA
Muted text5.87:1AA
Accent6.45:1AA
Destructive4.90:1AA
Dark mode
Text on background8.73:1AAA
Text on card11.19:1AAA
Primary button9.03:1AAA
Secondary button8.31:1AAA
Muted text5.87:1AA
Accent6.45:1AA
Destructive4.90:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.301 0 189.462);
  --foreground: oklch(0.858 0.052 291.372);
  --muted: oklch(0.33 0.02 18.192);
  --muted-foreground: oklch(0.769 0.02 17.59);
  --popover: oklch(0.27 0 180);
  --popover-foreground: oklch(0.968 0.012 292.317);
  --card: oklch(0.28 0 180);
  --card-foreground: oklch(0.913 0.032 291.886);
  --border: oklch(0.351 0 167.471);
  --input: oklch(0.38 0 180);
  --primary: oklch(0.858 0.052 291.372);
  --primary-foreground: oklch(0.303 0.129 281.442);
  --secondary: oklch(0.321 0.067 288.142);
  --secondary-foreground: oklch(0.859 0.032 291.842);
  --accent: oklch(0.446 0 180);
  --accent-foreground: oklch(0.947 0 180);
  --destructive: oklch(0.576 0.233 29.42);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.858 0.052 291.372);
  --chart-1: oklch(0.858 0.052 291.372);
  --chart-2: oklch(0.321 0.067 288.142);
  --chart-3: oklch(0.446 0 180);
  --chart-4: oklch(0.345 0.073 288.028);
  --chart-5: oklch(0.856 0.055 291.304);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.301 0 189.462);
  --foreground: oklch(0.858 0.052 291.372);
  --muted: oklch(0.33 0.02 18.192);
  --muted-foreground: oklch(0.769 0.02 17.59);
  --popover: oklch(0.27 0 180);
  --popover-foreground: oklch(0.968 0.012 292.317);
  --card: oklch(0.28 0 180);
  --card-foreground: oklch(0.913 0.032 291.886);
  --border: oklch(0.351 0 167.471);
  --input: oklch(0.38 0 180);
  --primary: oklch(0.858 0.052 291.372);
  --primary-foreground: oklch(0.303 0.129 281.442);
  --secondary: oklch(0.321 0.067 288.142);
  --secondary-foreground: oklch(0.859 0.032 291.842);
  --accent: oklch(0.446 0 180);
  --accent-foreground: oklch(0.947 0 180);
  --destructive: oklch(0.576 0.233 29.42);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.858 0.052 291.372);
  --chart-1: oklch(0.858 0.052 291.372);
  --chart-2: oklch(0.321 0.067 288.142);
  --chart-3: oklch(0.446 0 180);
  --chart-4: oklch(0.345 0.073 288.028);
  --chart-5: oklch(0.856 0.055 291.304);
}