Strife for shadcn/ui

Strife is a shadcn/ui theme built around a deep violet primary color (#59286c) with deep teal accents (#286c59). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the deep violet primary (#59286c) on a neutral background (#060307).

Color palette

TokenLightDark
Background
#fdfcfdwhite
#060307black
Foreground
#0d0410black
#fdfcfdwhite
Card
#fbf8fbsnow
#09040bblack
Card foreground
#0a030cblack
#ffffffwhite
Popover
#fdfcfdwhite
#060307black
Popover foreground
#0d0410black
#fdfcfdwhite
Primary
#59286cdarkslateblue
#59286cdarkslateblue
Primary foreground
#e9d6f0lavender
#e9d6f0lavender
Secondary
#6c5928darkolivegreen
#6c5928darkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ece8dfbeige
#201c13black
Muted foreground
#52504cdarkslategray
#b3b1addarkgray
Accent
#286c59darkslategray
#286c59darkslategray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#bf2008firebrick
#f53619orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#59286cdarkslateblue
#59286cdarkslateblue

Contrast

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

Light mode
Text on background19.64:1AAA
Text on card19.34:1AAA
Primary button7.90:1AAA
Secondary button6.80:1AA
Muted text6.58:1AA
Accent6.21:1AA
Destructive6.12:1AA
Dark mode
Text on background20.05:1AAA
Text on card20.30:1AAA
Primary button7.90:1AAA
Secondary button6.80:1AA
Muted text7.92:1AAA
Accent6.21:1AA
Destructive3.85:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 316.602);
  --foreground: oklch(0.133 0.031 317.092);
  --muted: oklch(0.932 0.012 88.872);
  --muted-foreground: oklch(0.433 0.008 88.897);
  --popover: oklch(0.991 0.002 316.602);
  --popover-foreground: oklch(0.133 0.031 317.092);
  --card: oklch(0.983 0.005 316.594);
  --card-foreground: oklch(0.12 0.027 318.267);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.376 0.121 315.251);
  --primary-foreground: oklch(0.899 0.04 316.479);
  --secondary: oklch(0.471 0.071 87.861);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.482 0.076 171.322);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.518 0.195 31.278);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.376 0.121 315.251);
  --chart-1: oklch(0.376 0.121 315.251);
  --chart-2: oklch(0.471 0.071 87.861);
  --chart-3: oklch(0.482 0.076 171.322);
  --chart-4: oklch(0.505 0.077 87.809);
  --chart-5: oklch(0.375 0.127 315.104);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.019 318.202);
  --foreground: oklch(0.992 0.001 316.605);
  --muted: oklch(0.228 0.017 88.998);
  --muted-foreground: oklch(0.762 0.007 88.847);
  --popover: oklch(0.107 0.019 318.202);
  --popover-foreground: oklch(0.992 0.001 316.605);
  --card: oklch(0.122 0.022 318.063);
  --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.376 0.121 315.251);
  --primary-foreground: oklch(0.899 0.04 316.479);
  --secondary: oklch(0.471 0.071 87.861);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.482 0.076 171.322);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.633 0.229 31.538);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.376 0.121 315.251);
  --chart-1: oklch(0.376 0.121 315.251);
  --chart-2: oklch(0.471 0.071 87.861);
  --chart-3: oklch(0.482 0.076 171.322);
  --chart-4: oklch(0.505 0.077 87.809);
  --chart-5: oklch(0.375 0.127 315.104);
}