Adaptation for shadcn/ui

Adaptation is a shadcn/ui theme built around a muted light violet primary color (#d9cbe2) with muted light purple accents (#e2cbdf). The light mode uses a neutral background (#fbf7fd). Dark mode keeps the muted light violet primary (#d9cbe2) on a neutral background (#030104).

Color palette

TokenLightDark
Background
#fbf7fdghostwhite
#030104black
Foreground
#060109black
#f8f5f9whitesmoke
Card
#fbf7fdghostwhite
#030104black
Card foreground
#060109black
#f8f5f9whitesmoke
Popover
#fbf7fdghostwhite
#030104black
Popover foreground
#060109black
#f8f5f9whitesmoke
Primary
#d9cbe2thistle
#d9cbe2thistle
Primary foreground
#412c4edarkslategray
#412c4edarkslategray
Secondary
#cdcbe2lightgrey
#cdcbe2lightgrey
Secondary foreground
#302c4edarkslategray
#302c4edarkslategray
Muted
#f2f2f3whitesmoke
#0c0c0dblack
Muted foreground
#3e3d48darkslategray
#b9b7c2silver
Accent
#e2cbdfthistle
#e2cbdfthistle
Accent foreground
#4e2c4adarkslategray
#4e2c4adarkslategray
Destructive
#9c3107saddlebrown
#f55f24tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d9cbe2thistle
#d9cbe2thistle

Contrast

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

Light mode
Text on background19.50:1AAA
Text on card19.50:1AAA
Primary button8.00:1AAA
Secondary button8.28:1AAA
Muted text9.51:1AAA
Accent7.74:1AAA
Destructive7.34:1AAA
Dark mode
Text on background19.21:1AAA
Text on card19.21:1AAA
Primary button8.00:1AAA
Secondary button8.28:1AAA
Muted text9.87:1AAA
Accent7.74:1AAA
Destructive6.53:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.008 312.929);
  --foreground: oklch(0.098 0.034 315.873);
  --muted: oklch(0.96 0.002 291.746);
  --muted-foreground: oklch(0.365 0.018 290.827);
  --popover: oklch(0.981 0.008 312.929);
  --popover-foreground: oklch(0.098 0.034 315.873);
  --card: oklch(0.981 0.008 312.929);
  --card-foreground: oklch(0.098 0.034 315.873);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.86 0.035 312.712);
  --primary-foreground: oklch(0.334 0.064 311.612);
  --secondary: oklch(0.851 0.032 291.071);
  --secondary-foreground: oklch(0.315 0.06 287.758);
  --accent: oklch(0.866 0.037 329.621);
  --accent-foreground: oklch(0.349 0.068 331.232);
  --destructive: oklch(0.469 0.149 37.984);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.86 0.035 312.712);
  --chart-1: oklch(0.86 0.035 312.712);
  --chart-2: oklch(0.851 0.032 291.071);
  --chart-3: oklch(0.866 0.037 329.621);
  --chart-4: oklch(0.879 0.025 291.23);
  --chart-5: oklch(0.858 0.038 312.682);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.083 0.016 314.629);
  --foreground: oklch(0.974 0.006 312.943);
  --muted: oklch(0.156 0.003 291.453);
  --muted-foreground: oklch(0.785 0.015 291.419);
  --popover: oklch(0.083 0.016 314.629);
  --popover-foreground: oklch(0.974 0.006 312.943);
  --card: oklch(0.083 0.016 314.629);
  --card-foreground: oklch(0.974 0.006 312.943);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.86 0.035 312.712);
  --primary-foreground: oklch(0.334 0.064 311.612);
  --secondary: oklch(0.851 0.032 291.071);
  --secondary-foreground: oklch(0.315 0.06 287.758);
  --accent: oklch(0.866 0.037 329.621);
  --accent-foreground: oklch(0.349 0.068 331.232);
  --destructive: oklch(0.672 0.196 39.431);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.86 0.035 312.712);
  --chart-1: oklch(0.86 0.035 312.712);
  --chart-2: oklch(0.851 0.032 291.071);
  --chart-3: oklch(0.866 0.037 329.621);
  --chart-4: oklch(0.879 0.025 291.23);
  --chart-5: oklch(0.858 0.038 312.682);
}