Astrolabe for shadcn/ui

Astrolabe is a shadcn/ui theme built around a light violet primary color (#e0d1f5) with light green accents (#d1f5e0). The light mode uses a neutral background (#faf8fc). Dark mode keeps the light violet primary (#e0d1f5) on a violet-tinted background (#07030c).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#07030cblack
Foreground
#090212black
#ffffffwhite
Card
#faf8fcghostwhite
#07030cblack
Card foreground
#090212black
#ffffffwhite
Popover
#faf8fcghostwhite
#07030cblack
Popover foreground
#090212black
#ffffffwhite
Primary
#e0d1f5lavender
#e0d1f5lavender
Primary foreground
#421b79indigo
#421b79indigo
Secondary
#f5e0d1antiquewhite
#f5e0d1antiquewhite
Secondary foreground
#79421bsaddlebrown
#79421bsaddlebrown
Muted
#eae2dcgainsboro
#231b15black
Muted foreground
#494441darkslategray
#beb9b6silver
Accent
#d1f5e0gainsboro
#d1f5e0gainsboro
Accent foreground
#082515black
#082515black
Destructive
#6c1104maroon
#eb240aorangered
Destructive foreground
#fbb1a7lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e0d1f5lavender
#e0d1f5lavender

Contrast

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

Light mode
Text on background19.26:1AAA
Text on card19.26:1AAA
Primary button8.78:1AAA
Secondary button6.30:1AA
Muted text7.49:1AAA
Accent13.85:1AAA
Destructive6.97:1AA
Dark mode
Text on background20.40:1AAA
Text on card20.40:1AAA
Primary button8.78:1AAA
Secondary button6.30:1AA
Muted text8.72:1AAA
Accent13.85:1AAA
Destructive4.38:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.007 304.951);
  --foreground: oklch(0.119 0.043 304.488);
  --muted: oklch(0.917 0.012 58.174);
  --muted-foreground: oklch(0.391 0.009 58.052);
  --popover: oklch(0.981 0.007 304.951);
  --popover-foreground: oklch(0.119 0.043 304.488);
  --card: oklch(0.981 0.007 304.951);
  --card-foreground: oklch(0.119 0.043 304.488);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.884 0.05 304.257);
  --primary-foreground: oklch(0.339 0.147 296.663);
  --secondary: oklch(0.919 0.03 57.906);
  --secondary-foreground: oklch(0.439 0.091 53.1);
  --accent: oklch(0.938 0.046 159.806);
  --accent-foreground: oklch(0.239 0.048 154.688);
  --destructive: oklch(0.344 0.126 31.317);
  --destructive-foreground: oklch(0.828 0.089 27.525);
  --ring: oklch(0.884 0.05 304.257);
  --chart-1: oklch(0.884 0.05 304.257);
  --chart-2: oklch(0.919 0.03 57.906);
  --chart-3: oklch(0.938 0.046 159.806);
  --chart-4: oklch(0.941 0.022 58.041);
  --chart-5: oklch(0.883 0.053 304.218);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.116 0.025 305.966);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.23 0.018 57.244);
  --muted-foreground: oklch(0.79 0.007 58.234);
  --popover: oklch(0.116 0.025 305.966);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.116 0.025 305.966);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.884 0.05 304.257);
  --primary-foreground: oklch(0.339 0.147 296.663);
  --secondary: oklch(0.919 0.03 57.906);
  --secondary-foreground: oklch(0.439 0.091 53.1);
  --accent: oklch(0.938 0.046 159.806);
  --accent-foreground: oklch(0.239 0.048 154.688);
  --destructive: oklch(0.602 0.231 30.749);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.884 0.05 304.257);
  --chart-1: oklch(0.884 0.05 304.257);
  --chart-2: oklch(0.919 0.03 57.906);
  --chart-3: oklch(0.938 0.046 159.806);
  --chart-4: oklch(0.941 0.022 58.041);
  --chart-5: oklch(0.883 0.053 304.218);
}