Sundial for shadcn/ui

Sundial is a shadcn/ui theme built around a muted indigo primary color (#8074aa) with muted green accents (#74aa80). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the muted indigo primary (#8074aa) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfbfewhite
#000000black
Foreground
#000000black
#ffffffwhite
Card
#f9f8fcghostwhite
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#f9f8fcghostwhite
#030303black
Popover foreground
#000000black
#ffffffwhite
Primary
#8074aalightslategray
#8074aalightslategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#aa8074rosybrown
#aa8074rosybrown
Secondary foreground
#000000black
#000000black
Muted
#efececlinen
#131110black
Muted foreground
#564743darkolivegreen
#bcada9darkgray
Accent
#74aa80darkseagreen
#74aa80darkseagreen
Accent foreground
#000000black
#000000black
Destructive
#b03a07firebrick
#f65f1echocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8074aalightslategray
#8074aalightslategray

Contrast

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

Light mode
Text on background20.39:1AAA
Text on card19.79:1AAA
Primary button4.21:1AA Large
Secondary button6.01:1AA
Muted text7.52:1AAA
Accent7.77:1AAA
Destructive6.06:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button4.21:1AA Large
Secondary button6.01:1AA
Muted text8.68:1AAA
Accent7.77:1AAA
Destructive6.54:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 296.274);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.946 0.003 36.001);
  --muted-foreground: oklch(0.413 0.021 35.948);
  --popover: oklch(0.98 0.006 296.216);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.98 0.006 296.216);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.59 0.082 293.677);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.636 0.056 36.015);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.688 0.084 150.492);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.515 0.162 38.609);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.59 0.082 293.677);
  --chart-1: oklch(0.59 0.082 293.677);
  --chart-2: oklch(0.636 0.056 36.015);
  --chart-3: oklch(0.688 0.084 150.492);
  --chart-4: oklch(0.662 0.051 35.99);
  --chart-5: oklch(0.583 0.092 293.276);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.18 0.004 35.952);
  --muted-foreground: oklch(0.76 0.018 35.954);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.59 0.082 293.677);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.636 0.056 36.015);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.688 0.084 150.492);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.673 0.198 40.038);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.59 0.082 293.677);
  --chart-1: oklch(0.59 0.082 293.677);
  --chart-2: oklch(0.636 0.056 36.015);
  --chart-3: oklch(0.688 0.084 150.492);
  --chart-4: oklch(0.662 0.051 35.99);
  --chart-5: oklch(0.583 0.092 293.276);
}