Dynamics for shadcn/ui

Dynamics is a shadcn/ui theme built around a vivid purple primary color (#f65df8) with vivid green accents (#60f85d). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid purple primary (#f65df8) on a purple-tinted background (#0b040b).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b040bblack
Foreground
#140514black
#ffffffwhite
Card
#ffffffwhite
#0b040bblack
Card foreground
#140514black
#ffffffwhite
Popover
#ffffffwhite
#0b040bblack
Popover foreground
#140514black
#ffffffwhite
Primary
#f65df8violet
#f65df8violet
Primary foreground
#220122black
#220122black
Secondary
#60f85dlightgreen
#60f85dlightgreen
Secondary foreground
#022201black
#022201black
Muted
#d8e9d8gainsboro
#172716black
Muted foreground
#626462dimgray
#9b9d9bdarkgray
Accent
#60f85dlightgreen
#60f85dlightgreen
Accent foreground
#022201black
#022201black
Destructive
#921102darkred
#f61c04red
Destructive foreground
#fecdc8pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f65df8violet
#f65df8violet

Contrast

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

Light mode
Text on background19.78:1AAA
Text on card19.78:1AAA
Primary button7.16:1AAA
Secondary button12.27:1AAA
Muted text4.70:1AA
Accent12.27:1AAA
Destructive6.44:1AA
Dark mode
Text on background20.24:1AAA
Text on card20.24:1AAA
Primary button7.16:1AAA
Secondary button12.27:1AAA
Muted text5.75:1AA
Accent12.27:1AAA
Destructive4.12:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.152 0.039 326.706);
  --muted: oklch(0.916 0.028 144.883);
  --muted-foreground: oklch(0.502 0.004 145.046);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.152 0.039 326.706);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.152 0.039 326.706);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.732 0.252 327.098);
  --primary-foreground: oklch(0.179 0.077 327.535);
  --secondary: oklch(0.867 0.235 142.971);
  --secondary-foreground: oklch(0.221 0.071 142.364);
  --accent: oklch(0.867 0.235 142.971);
  --accent-foreground: oklch(0.221 0.071 142.364);
  --destructive: oklch(0.421 0.163 30.727);
  --destructive-foreground: oklch(0.89 0.056 25.631);
  --ring: oklch(0.732 0.252 327.098);
  --chart-1: oklch(0.732 0.252 327.098);
  --chart-2: oklch(0.867 0.235 142.971);
  --chart-3: oklch(0.867 0.235 142.971);
  --chart-4: oklch(0.875 0.219 143.147);
  --chart-5: oklch(0.734 0.258 327.132);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.023 326.362);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.252 0.038 143.982);
  --muted-foreground: oklch(0.692 0.004 145.064);
  --popover: oklch(0.126 0.023 326.362);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.126 0.023 326.362);
  --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.732 0.252 327.098);
  --primary-foreground: oklch(0.179 0.077 327.535);
  --secondary: oklch(0.867 0.235 142.971);
  --secondary-foreground: oklch(0.221 0.071 142.364);
  --accent: oklch(0.867 0.235 142.971);
  --accent-foreground: oklch(0.221 0.071 142.364);
  --destructive: oklch(0.618 0.244 30.279);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.732 0.252 327.098);
  --chart-1: oklch(0.732 0.252 327.098);
  --chart-2: oklch(0.867 0.235 142.971);
  --chart-3: oklch(0.867 0.235 142.971);
  --chart-4: oklch(0.875 0.219 143.147);
  --chart-5: oklch(0.734 0.258 327.132);
}