Astrolabe for shadcn/ui

Astrolabe is a shadcn/ui theme built around a vivid light violet primary color (#f8f0ff) with vivid light purple accents (#fff0fe). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the vivid light violet primary (#f8f0ff) on a violet-tinted background (#08050a).

Color palette

TokenLightDark
Background
#fcfbfewhite
#08050ablack
Foreground
#08040cblack
#faf8fcghostwhite
Card
#faf7fdghostwhite
#0a070eblack
Card foreground
#050208black
#fcfcfdwhite
Popover
#fcfbfewhite
#08050ablack
Popover foreground
#08040cblack
#faf8fcghostwhite
Primary
#f8f0ffghostwhite
#f8f0ffghostwhite
Primary foreground
#6104b9rebeccapurple
#6104b9rebeccapurple
Secondary
#f0f0ffaliceblue
#f0f0ffaliceblue
Secondary foreground
#2c28fbblue
#2c28fbblue
Muted
#dedee3gainsboro
#1d1c21black
Muted foreground
#3e3e46darkslategray
#b9b9c1silver
Accent
#fff0felavenderblush
#fff0felavenderblush
Accent foreground
#550254indigo
#550254indigo
Destructive
#cc550fchocolate
#f18241coral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f8f0ffghostwhite
#f8f0ffghostwhite

Contrast

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

Light mode
Text on background19.74:1AAA
Text on card19.43:1AAA
Primary button8.48:1AAA
Secondary button6.64:1AA
Muted text7.91:1AAA
Accent12.56:1AAA
Destructive4.32:1AA Large
Dark mode
Text on background19.19:1AAA
Text on card19.53:1AAA
Primary button8.48:1AAA
Secondary button6.64:1AA
Muted text8.66:1AAA
Accent12.56:1AAA
Destructive7.97:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 309.083);
  --foreground: oklch(0.119 0.023 310.41);
  --muted: oklch(0.903 0.006 287.052);
  --muted-foreground: oklch(0.368 0.014 286.481);
  --popover: oklch(0.99 0.004 309.083);
  --popover-foreground: oklch(0.119 0.023 310.41);
  --card: oklch(0.98 0.008 309.04);
  --card-foreground: oklch(0.104 0.02 310.59);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.965 0.021 308.897);
  --primary-foreground: oklch(0.426 0.229 296.6);
  --secondary: oklch(0.96 0.02 286.791);
  --secondary-foreground: oklch(0.478 0.287 268.919);
  --accent: oklch(0.971 0.025 326.256);
  --accent-foreground: oklch(0.316 0.142 329.147);
  --destructive: oklch(0.595 0.167 43.923);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.965 0.021 308.897);
  --chart-1: oklch(0.965 0.021 308.897);
  --chart-2: oklch(0.96 0.02 286.791);
  --chart-3: oklch(0.971 0.025 326.256);
  --chart-4: oklch(1 0 180);
  --chart-5: oklch(0.965 0.022 308.89);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.015 310.043);
  --foreground: oklch(0.982 0.005 309.071);
  --muted: oklch(0.23 0.008 286.503);
  --muted-foreground: oklch(0.787 0.011 286.908);
  --popover: oklch(0.124 0.015 310.043);
  --popover-foreground: oklch(0.982 0.005 309.071);
  --card: oklch(0.136 0.017 308.908);
  --card-foreground: oklch(0.991 0.003 309.099);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.965 0.021 308.897);
  --primary-foreground: oklch(0.426 0.229 296.6);
  --secondary: oklch(0.96 0.02 286.791);
  --secondary-foreground: oklch(0.478 0.287 268.919);
  --accent: oklch(0.971 0.025 326.256);
  --accent-foreground: oklch(0.316 0.142 329.147);
  --destructive: oklch(0.718 0.157 48.286);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.965 0.021 308.897);
  --chart-1: oklch(0.965 0.021 308.897);
  --chart-2: oklch(0.96 0.02 286.791);
  --chart-3: oklch(0.971 0.025 326.256);
  --chart-4: oklch(1 0 180);
  --chart-5: oklch(0.965 0.022 308.89);
}