Front for shadcn/ui

Front is a shadcn/ui theme built around a vivid violet primary color (#5706a2) with vivid purple accents (#a206a0). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid violet primary (#5706a2) on a violet-tinted background (#08040b).

Color palette

TokenLightDark
Background
#ffffffwhite
#08040bblack
Foreground
#0d0317black
#ffffffwhite
Card
#ffffffwhite
#08040bblack
Card foreground
#0d0317black
#ffffffwhite
Popover
#ffffffwhite
#08040bblack
Popover foreground
#0d0317black
#ffffffwhite
Primary
#5706a2indigo
#5706a2indigo
Primary foreground
#eeddfelavender
#eeddfelavender
Secondary
#0806a2darkblue
#0806a2darkblue
Secondary foreground
#ddddfelavender
#ddddfelavender
Muted
#eeeef7whitesmoke
#080811black
Muted foreground
#444450darkslategray
#afafbbdarkgray
Accent
#a206a0darkmagenta
#a206a0darkmagenta
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#720e09maroon
#ef382ecrimson
Destructive foreground
#f9b7b3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5706a2indigo
#5706a2indigo

Contrast

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

Light mode
Text on background20.14:1AAA
Text on card20.14:1AAA
Primary button8.40:1AAA
Secondary button10.15:1AAA
Muted text8.30:1AAA
Accent6.82:1AA
Destructive7.00:1AAA
Dark mode
Text on background20.31:1AAA
Text on card20.31:1AAA
Primary button8.40:1AAA
Secondary button10.15:1AAA
Muted text9.16:1AAA
Accent6.82:1AA
Destructive3.97:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.134 0.048 307.42);
  --muted: oklch(0.951 0.012 286.939);
  --muted-foreground: oklch(0.392 0.02 286.209);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.134 0.048 307.42);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.134 0.048 307.42);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.391 0.207 297.438);
  --primary-foreground: oklch(0.92 0.048 308.578);
  --secondary: oklch(0.328 0.219 265.604);
  --secondary-foreground: oklch(0.907 0.045 286.227);
  --accent: oklch(0.501 0.226 329.196);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.355 0.134 29.129);
  --destructive-foreground: oklch(0.839 0.078 22.273);
  --ring: oklch(0.391 0.207 297.438);
  --chart-1: oklch(0.391 0.207 297.438);
  --chart-2: oklch(0.328 0.219 265.604);
  --chart-3: oklch(0.501 0.226 329.196);
  --chart-4: oklch(0.35 0.234 265.456);
  --chart-5: oklch(0.392 0.211 296.904);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.121 0.019 310.253);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.141 0.02 284.446);
  --muted-foreground: oklch(0.758 0.017 286.76);
  --popover: oklch(0.121 0.019 310.253);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.121 0.019 310.253);
  --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.391 0.207 297.438);
  --primary-foreground: oklch(0.92 0.048 308.578);
  --secondary: oklch(0.328 0.219 265.604);
  --secondary-foreground: oklch(0.907 0.045 286.227);
  --accent: oklch(0.501 0.226 329.196);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.625 0.22 28.469);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.391 0.207 297.438);
  --chart-1: oklch(0.391 0.207 297.438);
  --chart-2: oklch(0.328 0.219 265.604);
  --chart-3: oklch(0.501 0.226 329.196);
  --chart-4: oklch(0.35 0.234 265.456);
  --chart-5: oklch(0.392 0.211 296.904);
}