Spectacles for shadcn/ui

Spectacles is a shadcn/ui theme built around a muted light green primary color (#e9eee2) with muted light violet accents (#e7e2ee). The light mode uses a neutral background (#fafcf8). Dark mode keeps the muted light green primary (#e9eee2) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fafcf8snow
#000000black
Foreground
#090e02black
#fafbf9snow
Card
#f8fbf4whitesmoke
#030303black
Card foreground
#060901black
#fdfdfcwhite
Popover
#fafcf8snow
#000000black
Popover foreground
#090e02black
#fafbf9snow
Primary
#e9eee2beige
#e9eee2beige
Primary foreground
#1e2315black
#1e2315black
Secondary
#e7e2eelavender
#e7e2eelavender
Secondary foreground
#4a3a64darkslateblue
#4a3a64darkslateblue
Muted
#f2eff5whitesmoke
#0c0a10black
Muted foreground
#65616bdimgray
#98949edarkgray
Accent
#e7e2eelavender
#e7e2eelavender
Accent foreground
#4a3a64darkslateblue
#4a3a64darkslateblue
Destructive
#7a2a0bsaddlebrown
#ee6d3atomato
Destructive foreground
#f9cebdpeachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e9eee2beige
#e9eee2beige

Contrast

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

Light mode
Text on background18.96:1AAA
Text on card19.18:1AAA
Primary button13.63:1AAA
Secondary button7.93:1AAA
Muted text5.30:1AA
Accent7.93:1AAA
Destructive6.73:1AA
Dark mode
Text on background20.23:1AAA
Text on card20.31:1AAA
Primary button13.63:1AAA
Secondary button7.93:1AAA
Muted text6.63:1AA
Accent7.93:1AAA
Destructive6.87:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.007 123.738);
  --foreground: oklch(0.153 0.031 123.525);
  --muted: oklch(0.956 0.008 303.508);
  --muted-foreground: oklch(0.499 0.017 303.146);
  --popover: oklch(0.989 0.007 123.738);
  --popover-foreground: oklch(0.153 0.031 123.525);
  --card: oklch(0.984 0.01 123.789);
  --card-foreground: oklch(0.132 0.027 122.817);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.942 0.017 123.901);
  --primary-foreground: oklch(0.247 0.027 125.392);
  --secondary: oklch(0.92 0.017 303.371);
  --secondary-foreground: oklch(0.386 0.07 300.807);
  --accent: oklch(0.92 0.017 303.371);
  --accent-foreground: oklch(0.386 0.07 300.807);
  --destructive: oklch(0.4 0.118 39.205);
  --destructive-foreground: oklch(0.885 0.054 42.701);
  --ring: oklch(0.942 0.017 123.901);
  --chart-1: oklch(0.942 0.017 123.901);
  --chart-2: oklch(0.92 0.017 303.371);
  --chart-3: oklch(0.92 0.017 303.371);
  --chart-4: oklch(0.947 0.011 303.466);
  --chart-5: oklch(0.944 0.018 123.931);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.986 0.002 123.673);
  --muted: oklch(0.149 0.013 302.296);
  --muted-foreground: oklch(0.673 0.015 303.3);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.986 0.002 123.673);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.993 0.001 123.656);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.942 0.017 123.901);
  --primary-foreground: oklch(0.247 0.027 125.392);
  --secondary: oklch(0.92 0.017 303.371);
  --secondary-foreground: oklch(0.386 0.07 300.807);
  --accent: oklch(0.92 0.017 303.371);
  --accent-foreground: oklch(0.386 0.07 300.807);
  --destructive: oklch(0.682 0.172 40.832);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.942 0.017 123.901);
  --chart-1: oklch(0.942 0.017 123.901);
  --chart-2: oklch(0.92 0.017 303.371);
  --chart-3: oklch(0.92 0.017 303.371);
  --chart-4: oklch(0.947 0.011 303.466);
  --chart-5: oklch(0.944 0.018 123.931);
}