Automatic for shadcn/ui

Automatic is a shadcn/ui theme built around a vivid indigo primary color (#7e84f1) with vivid violet accents (#b27ef1). The light mode uses a neutral background (#fbfcfd). Dark mode keeps the vivid indigo primary (#7e84f1) on an indigo-tinted background (#05050a).

Color palette

TokenLightDark
Background
#fbfcfdwhite
#05050ablack
Foreground
#060713black
#f5f5fawhitesmoke
Card
#f8f8fcghostwhite
#07070eblack
Card foreground
#05060fblack
#f8f9fbghostwhite
Popover
#f8f8fcghostwhite
#07070eblack
Popover foreground
#05060fblack
#f8f9fbghostwhite
Primary
#7e84f1mediumslateblue
#7e84f1mediumslateblue
Primary foreground
#000000black
#000000black
Secondary
#7ebdf1skyblue
#7ebdf1skyblue
Secondary foreground
#062137midnightblue
#062137midnightblue
Muted
#ebedf0lavender
#0f1214black
Muted foreground
#49555fdarkslategray
#a0acb6darkgray
Accent
#b27ef1mediumpurple
#b27ef1mediumpurple
Accent foreground
#1c0637midnightblue
#1c0637midnightblue
Destructive
#980b0bdarkred
#ee1b1bcrimson
Destructive foreground
#fcd9d9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7e84f1mediumslateblue
#7e84f1mediumslateblue

Contrast

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

Light mode
Text on background19.48:1AAA
Text on card19.08:1AAA
Primary button6.43:1AA
Secondary button8.17:1AAA
Muted text6.52:1AA
Accent6.31:1AA
Destructive6.73:1AA
Dark mode
Text on background18.70:1AAA
Text on card19.08:1AAA
Primary button6.43:1AA
Secondary button8.17:1AAA
Muted text8.11:1AAA
Accent6.31:1AA
Destructive4.36:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.002 283.928);
  --foreground: oklch(0.135 0.028 279.13);
  --muted: oklch(0.946 0.004 242.253);
  --muted-foreground: oklch(0.444 0.022 242.872);
  --popover: oklch(0.98 0.005 283.883);
  --popover-foreground: oklch(0.125 0.024 279.23);
  --card: oklch(0.98 0.005 283.883);
  --card-foreground: oklch(0.125 0.024 279.23);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.658 0.161 278.715);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.776 0.099 244.249);
  --secondary-foreground: oklch(0.241 0.054 246.955);
  --accent: oklch(0.692 0.17 302.999);
  --accent-foreground: oklch(0.198 0.089 298.382);
  --destructive: oklch(0.431 0.17 28.376);
  --destructive-foreground: oklch(0.915 0.039 17.89);
  --ring: oklch(0.658 0.161 278.715);
  --chart-1: oklch(0.658 0.161 278.715);
  --chart-2: oklch(0.776 0.099 244.249);
  --chart-3: oklch(0.692 0.17 302.999);
  --chart-4: oklch(0.8 0.089 243.891);
  --chart-5: oklch(0.654 0.167 278.443);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.014 281.079);
  --foreground: oklch(0.972 0.006 283.868);
  --muted: oklch(0.181 0.006 242.665);
  --muted-foreground: oklch(0.738 0.02 242.547);
  --popover: oklch(0.132 0.016 281.102);
  --popover-foreground: oklch(0.981 0.004 283.903);
  --card: oklch(0.132 0.016 281.102);
  --card-foreground: oklch(0.981 0.004 283.903);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.658 0.161 278.715);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.776 0.099 244.249);
  --secondary-foreground: oklch(0.241 0.054 246.955);
  --accent: oklch(0.692 0.17 302.999);
  --accent-foreground: oklch(0.198 0.089 298.382);
  --destructive: oklch(0.604 0.236 28.237);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.658 0.161 278.715);
  --chart-1: oklch(0.658 0.161 278.715);
  --chart-2: oklch(0.776 0.099 244.249);
  --chart-3: oklch(0.692 0.17 302.999);
  --chart-4: oklch(0.8 0.089 243.891);
  --chart-5: oklch(0.654 0.167 278.443);
}