Eyeglasses for shadcn/ui

Eyeglasses is a shadcn/ui theme built around a deep purple primary color (#621e57) with deep cyan accents (#1e5762). The light mode uses a neutral background (#fdf7fc). Dark mode keeps the deep purple primary (#621e57) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdf7fcsnow
#000000black
Foreground
#11040fblack
#fbf9fbsnow
Card
#fdf7fcsnow
#000000black
Card foreground
#11040fblack
#fbf9fbsnow
Popover
#fdf7fcsnow
#000000black
Popover foreground
#11040fblack
#fbf9fbsnow
Primary
#621e57indigo
#621e57indigo
Primary foreground
#edc4e7thistle
#edc4e7thistle
Secondary
#57621edarkolivegreen
#57621edarkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ecede8linen
#161712black
Muted foreground
#45463fdarkslategray
#bfc0b9silver
Accent
#1e5762darkslategray
#1e5762darkslategray
Accent foreground
#c4e7edpaleturquoise
#c4e7edpaleturquoise
Destructive
#b44b0esienna
#ef752etomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#621e57indigo
#621e57indigo

Contrast

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

Light mode
Text on background18.97:1AAA
Text on card18.97:1AAA
Primary button7.42:1AAA
Secondary button6.65:1AA
Muted text8.11:1AAA
Accent6.13:1AA
Destructive5.31:1AA
Dark mode
Text on background20.04:1AAA
Text on card20.04:1AAA
Primary button7.42:1AAA
Secondary button6.65:1AA
Muted text9.83:1AAA
Accent6.13:1AA
Destructive7.26:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.009 330.36);
  --foreground: oklch(0.137 0.036 332.566);
  --muted: oklch(0.944 0.007 113.436);
  --muted-foreground: oklch(0.39 0.011 113.833);
  --popover: oklch(0.982 0.009 330.36);
  --popover-foreground: oklch(0.137 0.036 332.566);
  --card: oklch(0.982 0.009 330.36);
  --card-foreground: oklch(0.137 0.036 332.566);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.363 0.121 334.258);
  --primary-foreground: oklch(0.867 0.064 331.169);
  --secondary: oklch(0.471 0.091 117.338);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.426 0.061 211.29);
  --accent-foreground: oklch(0.905 0.037 209.446);
  --destructive: oklch(0.543 0.152 44.163);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.363 0.121 334.258);
  --chart-1: oklch(0.363 0.121 334.258);
  --chart-2: oklch(0.471 0.091 117.338);
  --chart-3: oklch(0.426 0.061 211.29);
  --chart-4: oklch(0.51 0.1 117.396);
  --chart-5: oklch(0.365 0.127 334.439);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.983 0.004 330.302);
  --muted: oklch(0.201 0.01 114.186);
  --muted-foreground: oklch(0.805 0.009 113.52);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.983 0.004 330.302);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.983 0.004 330.302);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.363 0.121 334.258);
  --primary-foreground: oklch(0.867 0.064 331.169);
  --secondary: oklch(0.471 0.091 117.338);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.426 0.061 211.29);
  --accent-foreground: oklch(0.905 0.037 209.446);
  --destructive: oklch(0.695 0.171 46.831);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.363 0.121 334.258);
  --chart-1: oklch(0.363 0.121 334.258);
  --chart-2: oklch(0.471 0.091 117.338);
  --chart-3: oklch(0.426 0.061 211.29);
  --chart-4: oklch(0.51 0.1 117.396);
  --chart-5: oklch(0.365 0.127 334.439);
}