Routine for shadcn/ui

Routine is a shadcn/ui theme built around a vivid indigo primary color (#1a0c9d) with vivid violet accents (#630c9d). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the vivid indigo primary (#1a0c9d) on an indigo-tinted background (#05040b).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#05040bblack
Foreground
#070514black
#f5f5fawhitesmoke
Card
#fbfbfeghostwhite
#05040bblack
Card foreground
#070514black
#f5f5fawhitesmoke
Popover
#fbfbfeghostwhite
#05040bblack
Popover foreground
#070514black
#f5f5fawhitesmoke
Primary
#1a0c9ddarkblue
#1a0c9ddarkblue
Primary foreground
#e1defdlavender
#e1defdlavender
Secondary
#0c469ddarkslateblue
#0c469ddarkslateblue
Secondary foreground
#deeafdlavender
#deeafdlavender
Muted
#d7dae0gainsboro
#1f2328darkslategray
Muted foreground
#4c5057darkslategray
#a8acb3darkgray
Accent
#630c9dindigo
#630c9dindigo
Accent foreground
#f0defdlavender
#f0defdlavender
Destructive
#cf2c07firebrick
#ec3209orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1a0c9ddarkblue
#1a0c9ddarkblue

Contrast

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

Light mode
Text on background19.53:1AAA
Text on card19.53:1AAA
Primary button10.17:1AAA
Secondary button7.30:1AAA
Muted text5.79:1AA
Accent8.03:1AAA
Destructive5.23:1AA
Dark mode
Text on background18.75:1AAA
Text on card18.75:1AAA
Primary button10.17:1AAA
Secondary button7.30:1AAA
Muted text6.94:1AA
Accent8.03:1AAA
Destructive4.16:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.004 290.938);
  --foreground: oklch(0.132 0.033 286.656);
  --muted: oklch(0.888 0.009 258.336);
  --muted-foreground: oklch(0.431 0.013 258.365);
  --popover: oklch(0.989 0.004 290.938);
  --popover-foreground: oklch(0.132 0.033 286.656);
  --card: oklch(0.989 0.004 290.938);
  --card-foreground: oklch(0.132 0.033 286.656);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.331 0.206 270.145);
  --primary-foreground: oklch(0.912 0.042 290.136);
  --secondary: oklch(0.415 0.153 259.581);
  --secondary-foreground: oklch(0.934 0.028 258.366);
  --accent: oklch(0.403 0.201 304.66);
  --accent-foreground: oklch(0.924 0.045 311.994);
  --destructive: oklch(0.555 0.202 32.734);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.331 0.206 270.145);
  --chart-1: oklch(0.331 0.206 270.145);
  --chart-2: oklch(0.415 0.153 259.581);
  --chart-3: oklch(0.403 0.201 304.66);
  --chart-4: oklch(0.441 0.164 259.645);
  --chart-5: oklch(0.331 0.211 269.369);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.116 0.018 289.222);
  --foreground: oklch(0.971 0.007 290.875);
  --muted: oklch(0.254 0.012 258.372);
  --muted-foreground: oklch(0.744 0.011 258.346);
  --popover: oklch(0.116 0.018 289.222);
  --popover-foreground: oklch(0.971 0.007 290.875);
  --card: oklch(0.116 0.018 289.222);
  --card-foreground: oklch(0.971 0.007 290.875);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.331 0.206 270.145);
  --primary-foreground: oklch(0.912 0.042 290.136);
  --secondary: oklch(0.415 0.153 259.581);
  --secondary-foreground: oklch(0.934 0.028 258.366);
  --accent: oklch(0.403 0.201 304.66);
  --accent-foreground: oklch(0.924 0.045 311.994);
  --destructive: oklch(0.613 0.225 32.61);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.331 0.206 270.145);
  --chart-1: oklch(0.331 0.206 270.145);
  --chart-2: oklch(0.415 0.153 259.581);
  --chart-3: oklch(0.403 0.201 304.66);
  --chart-4: oklch(0.441 0.164 259.645);
  --chart-5: oklch(0.331 0.211 269.369);
}