Adaptation for shadcn/ui

Adaptation is a shadcn/ui theme built around a near-white primary color (#fafffb) with near-white accents (#fffbfa). The light mode uses a neutral background (#f6fdf8). Dark mode keeps the near-white primary (#fafffb) on a green-tinted background (#050a06).

Color palette

TokenLightDark
Background
#f6fdf8mintcream
#050a06black
Foreground
#031608black
#fcfdfcwhite
Card
#f2fdf5honeydew
#070e09black
Card foreground
#031206black
#ffffffwhite
Popover
#f6fdf8mintcream
#050a06black
Popover foreground
#031608black
#fcfdfcwhite
Primary
#fafffbmintcream
#fafffbmintcream
Primary foreground
#075a1cdarkgreen
#075a1cdarkgreen
Secondary
#fbfaffghostwhite
#fbfaffghostwhite
Secondary foreground
#390eb9indigo
#390eb9indigo
Muted
#e2e2e4gainsboro
#1b1b1dblack
Muted foreground
#5d586adimgray
#9a95a7darkgray
Accent
#fffbfasnow
#fffbfasnow
Accent foreground
#5a1c07maroon
#5a1c07maroon
Destructive
#9a230ebrown
#eb4628chocolate
Destructive foreground
#fce3demistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fafffbmintcream
#fafffbmintcream

Contrast

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

Light mode
Text on background18.16:1AAA
Text on card18.37:1AAA
Primary button8.33:1AAA
Secondary button10.45:1AAA
Muted text5.27:1AA
Accent12.75:1AAA
Destructive6.54:1AA
Dark mode
Text on background19.54:1AAA
Text on card19.57:1AAA
Primary button8.33:1AAA
Secondary button10.45:1AAA
Muted text5.93:1AA
Accent12.75:1AAA
Destructive3.86:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.01 153.705);
  --foreground: oklch(0.18 0.04 150.839);
  --muted: oklch(0.913 0.004 297.75);
  --muted-foreground: oklch(0.472 0.028 296.75);
  --popover: oklch(0.989 0.01 153.705);
  --popover-foreground: oklch(0.18 0.04 150.839);
  --card: oklch(0.983 0.015 153.616);
  --card-foreground: oklch(0.162 0.035 151.801);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.995 0.006 153.77);
  --primary-foreground: oklch(0.409 0.12 146.108);
  --secondary: oklch(0.988 0.006 297.719);
  --secondary-foreground: oklch(0.388 0.228 278.479);
  --accent: oklch(0.991 0.004 39.482);
  --accent-foreground: oklch(0.321 0.097 37.588);
  --destructive: oklch(0.451 0.158 32.223);
  --destructive-foreground: oklch(0.934 0.028 29.602);
  --ring: oklch(0.995 0.006 153.77);
  --chart-1: oklch(0.995 0.006 153.77);
  --chart-2: oklch(0.988 0.006 297.719);
  --chart-3: oklch(0.991 0.004 39.482);
  --chart-4: oklch(1.024 0.012 118.026);
  --chart-5: oklch(0.995 0.007 153.766);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.137 0.013 153.481);
  --foreground: oklch(0.993 0.002 153.842);
  --muted: oklch(0.223 0.005 297.387);
  --muted-foreground: oklch(0.68 0.026 297.149);
  --popover: oklch(0.137 0.013 153.481);
  --popover-foreground: oklch(0.993 0.002 153.842);
  --card: oklch(0.152 0.016 152.937);
  --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.995 0.006 153.77);
  --primary-foreground: oklch(0.409 0.12 146.108);
  --secondary: oklch(0.988 0.006 297.719);
  --secondary-foreground: oklch(0.388 0.228 278.479);
  --accent: oklch(0.991 0.004 39.482);
  --accent-foreground: oklch(0.321 0.097 37.588);
  --destructive: oklch(0.629 0.207 32.373);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.995 0.006 153.77);
  --chart-1: oklch(0.995 0.006 153.77);
  --chart-2: oklch(0.988 0.006 297.719);
  --chart-3: oklch(0.991 0.004 39.482);
  --chart-4: oklch(1.024 0.012 118.026);
  --chart-5: oklch(0.995 0.007 153.766);
}