Self-reliant for shadcn/ui

Self-reliant is a shadcn/ui theme built around a deep red primary color (#40111a) with deep blue accents (#111a40). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep red primary (#40111a) on a red-tinted background (#0d0708).

Color palette

TokenLightDark
Background
#ffffffwhite
#0d0708black
Foreground
#000000black
#fbf9f9snow
Card
#fcfcfcsnow
#11090ablack
Card foreground
#000000black
#fdfcfcsnow
Popover
#fcfcfcsnow
#11090ablack
Popover foreground
#000000black
#fdfcfcsnow
Primary
#40111ablack
#40111ablack
Primary foreground
#e59eablightpink
#e59eablightpink
Secondary
#1a4011darkgreen
#1a4011darkgreen
Secondary foreground
#abe59epalegreen
#abe59epalegreen
Muted
#e0eeddgainsboro
#142211black
Muted foreground
#455143darkslategray
#b0bcaedarkgray
Accent
#111a40midnightblue
#111a40midnightblue
Accent foreground
#9eabe5lightsteelblue
#9eabe5lightsteelblue
Destructive
#772c04saddlebrown
#f9762ftomato
Destructive foreground
#fdcbb0peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#40111ablack
#40111ablack

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button7.44:1AAA
Secondary button8.03:1AAA
Muted text6.96:1AA
Accent7.55:1AAA
Destructive6.69:1AA
Dark mode
Text on background19.02:1AAA
Text on card19.23:1AAA
Primary button7.44:1AAA
Secondary button8.03:1AAA
Muted text8.37:1AAA
Accent7.55:1AAA
Destructive7.63:1AAA

CSS variables

Paste this into your globals.css to use Self-reliant in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.935 0.028 139.964);
  --muted-foreground: oklch(0.421 0.029 139.934);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.26 0.074 12.903);
  --primary-foreground: oklch(0.773 0.086 7.211);
  --secondary: oklch(0.333 0.087 140.193);
  --secondary-foreground: oklch(0.866 0.113 139.909);
  --accent: oklch(0.235 0.074 270.23);
  --accent-foreground: oklch(0.753 0.085 274.412);
  --destructive: oklch(0.397 0.115 42.914);
  --destructive-foreground: oklch(0.878 0.067 49.757);
  --ring: oklch(0.26 0.074 12.903);
  --chart-1: oklch(0.26 0.074 12.903);
  --chart-2: oklch(0.333 0.087 140.193);
  --chart-3: oklch(0.235 0.074 270.23);
  --chart-4: oklch(0.373 0.099 140.234);
  --chart-5: oklch(0.261 0.077 13.462);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.012 5.145);
  --foreground: oklch(0.983 0.003 4.39);
  --muted: oklch(0.235 0.039 139.92);
  --muted-foreground: oklch(0.783 0.025 139.963);
  --popover: oklch(0.151 0.014 6.472);
  --popover-foreground: oklch(0.992 0.001 4.35);
  --card: oklch(0.151 0.014 6.472);
  --card-foreground: oklch(0.992 0.001 4.35);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.26 0.074 12.903);
  --primary-foreground: oklch(0.773 0.086 7.211);
  --secondary: oklch(0.333 0.087 140.193);
  --secondary-foreground: oklch(0.866 0.113 139.909);
  --accent: oklch(0.235 0.074 270.23);
  --accent-foreground: oklch(0.753 0.085 274.412);
  --destructive: oklch(0.709 0.179 45.287);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.26 0.074 12.903);
  --chart-1: oklch(0.26 0.074 12.903);
  --chart-2: oklch(0.333 0.087 140.193);
  --chart-3: oklch(0.235 0.074 270.23);
  --chart-4: oklch(0.373 0.099 140.234);
  --chart-5: oklch(0.261 0.077 13.462);
}