Motion for shadcn/ui

Motion is a shadcn/ui theme built around a muted light green primary color (#eff0eb) with muted light indigo accents (#ecebf0). The light mode uses a neutral background (#fefefb). Dark mode keeps the muted light green primary (#eff0eb) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefefbwhite
#000000black
Foreground
#131603black
#fdfdfcwhite
Card
#fcfdf6snow
#030303black
Card foreground
#0f1203black
#ffffffwhite
Popover
#fefefbwhite
#000000black
Popover foreground
#131603black
#fdfdfcwhite
Primary
#eff0eblinen
#eff0eblinen
Primary foreground
#24261dblack
#24261dblack
Secondary
#ecebf0lavender
#ecebf0lavender
Secondary foreground
#4d4860darkslategray
#4d4860darkslategray
Muted
#eae9eclavender
#141316black
Muted foreground
#4b475cdarkslategray
#a7a3b8darkgray
Accent
#ecebf0lavender
#ecebf0lavender
Accent foreground
#4d4860darkslategray
#4d4860darkslategray
Destructive
#d74e0fchocolate
#ef5a15orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#eff0eblinen
#eff0eblinen

Contrast

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

Light mode
Text on background18.17:1AAA
Text on card18.57:1AAA
Primary button13.34:1AAA
Secondary button7.31:1AAA
Muted text7.38:1AAA
Accent7.31:1AAA
Destructive4.21:1AA Large
Dark mode
Text on background20.63:1AAA
Text on card20.67:1AAA
Primary button13.34:1AAA
Secondary button7.31:1AAA
Muted text7.55:1AAA
Accent7.31:1AAA
Destructive3.41:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.996 0.005 114.91);
  --foreground: oklch(0.192 0.037 117.907);
  --muted: oklch(0.936 0.003 294.758);
  --muted-foreground: oklch(0.41 0.035 293.179);
  --popover: oklch(0.996 0.005 114.91);
  --popover-foreground: oklch(0.192 0.037 117.907);
  --card: oklch(0.992 0.009 114.997);
  --card-foreground: oklch(0.173 0.032 117.285);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.952 0.007 114.954);
  --primary-foreground: oklch(0.263 0.017 116.011);
  --secondary: oklch(0.941 0.007 294.691);
  --secondary-foreground: oklch(0.417 0.039 293.027);
  --accent: oklch(0.941 0.007 294.691);
  --accent-foreground: oklch(0.417 0.039 293.027);
  --destructive: oklch(0.603 0.183 40.052);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.952 0.007 114.954);
  --chart-1: oklch(0.952 0.007 114.954);
  --chart-2: oklch(0.941 0.007 294.691);
  --chart-3: oklch(0.941 0.007 294.691);
  --chart-4: oklch(0.966 0.004 294.75);
  --chart-5: oklch(0.953 0.008 114.981);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.001 114.847);
  --muted: oklch(0.189 0.005 294.337);
  --muted-foreground: oklch(0.725 0.031 294.031);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.993 0.001 114.847);
  --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.952 0.007 114.954);
  --primary-foreground: oklch(0.263 0.017 116.011);
  --secondary: oklch(0.941 0.007 294.691);
  --secondary-foreground: oklch(0.417 0.039 293.027);
  --accent: oklch(0.941 0.007 294.691);
  --accent-foreground: oklch(0.417 0.039 293.027);
  --destructive: oklch(0.657 0.196 40.429);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.952 0.007 114.954);
  --chart-1: oklch(0.952 0.007 114.954);
  --chart-2: oklch(0.941 0.007 294.691);
  --chart-3: oklch(0.941 0.007 294.691);
  --chart-4: oklch(0.966 0.004 294.75);
  --chart-5: oklch(0.953 0.008 114.981);
}