Spyglass for shadcn/ui

Spyglass is a shadcn/ui theme built around a vivid light green primary color (#e6f8c9) with vivid light green accents (#cef8c9). The light mode uses a neutral background (#fdfefb). Dark mode keeps the vivid light green primary (#e6f8c9) on a green-tinted background (#0b0f05).

Color palette

TokenLightDark
Background
#fdfefbwhite
#0b0f05black
Foreground
#060802black
#f8f9f6whitesmoke
Card
#fdfefbwhite
#0b0f05black
Card foreground
#060802black
#f8f9f6whitesmoke
Popover
#fdfefbwhite
#0b0f05black
Popover foreground
#060802black
#f8f9f6whitesmoke
Primary
#e6f8c9lightgoldenrodyellow
#e6f8c9lightgoldenrodyellow
Primary foreground
#182404black
#182404black
Secondary
#f8f3c9lemonchiffon
#f8f3c9lemonchiffon
Secondary foreground
#242104black
#242104black
Muted
#e6e4d5gainsboro
#2a2819black
Muted foreground
#6a6753dimgray
#aca995darkgray
Accent
#cef8c9gainsboro
#cef8c9gainsboro
Accent foreground
#082404black
#082404black
Destructive
#aa3c09saddlebrown
#f36320chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e6f8c9lightgoldenrodyellow
#e6f8c9lightgoldenrodyellow

Contrast

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

Light mode
Text on background19.89:1AAA
Text on card19.89:1AAA
Primary button14.43:1AAA
Secondary button14.38:1AAA
Muted text4.48:1AA Large
Accent14.17:1AAA
Destructive6.27:1AA
Dark mode
Text on background18.29:1AAA
Text on card18.29:1AAA
Primary button14.43:1AAA
Secondary button14.38:1AAA
Muted text6.27:1AA
Accent14.17:1AAA
Destructive6.62:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.005 123.709);
  --foreground: oklch(0.129 0.02 122.991);
  --muted: oklch(0.918 0.02 100.663);
  --muted-foreground: oklch(0.51 0.03 101.163);
  --popover: oklch(0.996 0.005 123.709);
  --popover-foreground: oklch(0.129 0.02 122.991);
  --card: oklch(0.996 0.005 123.709);
  --card-foreground: oklch(0.129 0.02 122.991);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.954 0.065 124.68);
  --primary-foreground: oklch(0.242 0.055 127.724);
  --secondary: oklch(0.957 0.055 101.135);
  --secondary-foreground: oklch(0.243 0.044 101.976);
  --accent: oklch(0.938 0.077 141.829);
  --accent-foreground: oklch(0.232 0.065 140.935);
  --destructive: oklch(0.506 0.154 40.009);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.954 0.065 124.68);
  --chart-1: oklch(0.954 0.065 124.68);
  --chart-2: oklch(0.957 0.055 101.135);
  --chart-3: oklch(0.938 0.077 141.829);
  --chart-4: oklch(0.968 0.041 100.948);
  --chart-5: oklch(0.956 0.068 124.718);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.161 0.022 124.614);
  --foreground: oklch(0.98 0.005 123.71);
  --muted: oklch(0.273 0.026 101.56);
  --muted-foreground: oklch(0.732 0.028 100.89);
  --popover: oklch(0.161 0.022 124.614);
  --popover-foreground: oklch(0.98 0.005 123.71);
  --card: oklch(0.161 0.022 124.614);
  --card-foreground: oklch(0.98 0.005 123.71);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.954 0.065 124.68);
  --primary-foreground: oklch(0.242 0.055 127.724);
  --secondary: oklch(0.957 0.055 101.135);
  --secondary-foreground: oklch(0.243 0.044 101.976);
  --accent: oklch(0.938 0.077 141.829);
  --accent-foreground: oklch(0.232 0.065 140.935);
  --destructive: oklch(0.675 0.192 41.446);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.954 0.065 124.68);
  --chart-1: oklch(0.954 0.065 124.68);
  --chart-2: oklch(0.957 0.055 101.135);
  --chart-3: oklch(0.938 0.077 141.829);
  --chart-4: oklch(0.968 0.041 100.948);
  --chart-5: oklch(0.956 0.068 124.718);
}