Disloyal for shadcn/ui

Disloyal is a shadcn/ui theme built around a vivid deep violet primary color (#590b83) with neutral gray accents (#cfcdd0). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the vivid deep violet primary (#590b83) on a neutral background (#030104).

Color palette

TokenLightDark
Background
#fdfbfewhite
#030104black
Foreground
#09040cblack
#fdfcfdwhite
Card
#fdfbfewhite
#030104black
Card foreground
#09040cblack
#fdfcfdwhite
Popover
#fdfbfewhite
#030104black
Popover foreground
#09040cblack
#fdfcfdwhite
Primary
#590b83indigo
#590b83indigo
Primary foreground
#e8c7falavender
#e8c7falavender
Secondary
#cfcdd0lightgrey
#18121cblack
Secondary foreground
#363437darkslategray
#b5a0c0darkgray
Muted
#ebe8edlavender
#151217black
Muted foreground
#605a63dimgray
#a29ca5darkgray
Accent
#cfcdd0lightgrey
#18121cblack
Accent foreground
#363437darkslategray
#b5a0c0darkgray
Destructive
#b73a01firebrick
#f44e01orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#590b83indigo
#590b83indigo

Contrast

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

Light mode
Text on background19.74:1AAA
Text on card19.74:1AAA
Primary button7.73:1AAA
Secondary button7.81:1AAA
Muted text5.52:1AA
Accent7.81:1AAA
Destructive5.79:1AA
Dark mode
Text on background20.28:1AAA
Text on card20.28:1AAA
Primary button7.73:1AAA
Secondary button7.64:1AAA
Muted text6.92:1AA
Accent7.64:1AAA
Destructive3.54:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 314.2);
  --foreground: oklch(0.12 0.025 315.803);
  --muted: oklch(0.936 0.007 314.18);
  --muted-foreground: oklch(0.475 0.017 314.026);
  --popover: oklch(0.991 0.004 314.2);
  --popover-foreground: oklch(0.12 0.025 315.803);
  --card: oklch(0.991 0.004 314.2);
  --card-foreground: oklch(0.12 0.025 315.803);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.367 0.177 308.536);
  --primary-foreground: oklch(0.873 0.078 313.727);
  --secondary: oklch(0.851 0.004 314.191);
  --secondary-foreground: oklch(0.328 0.006 314.114);
  --accent: oklch(0.851 0.004 314.191);
  --accent-foreground: oklch(0.328 0.006 314.114);
  --destructive: oklch(0.526 0.169 38.73);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.367 0.177 308.536);
  --chart-1: oklch(0.367 0.177 308.536);
  --chart-2: oklch(0.851 0.004 314.191);
  --chart-3: oklch(0.851 0.004 314.191);
  --chart-4: oklch(0.875 0.004 314.196);
  --chart-5: oklch(0.369 0.18 308.2);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.014 315.676);
  --foreground: oklch(0.992 0.001 314.215);
  --muted: oklch(0.188 0.01 313.927);
  --muted-foreground: oklch(0.701 0.015 314.1);
  --popover: oklch(0.085 0.014 315.676);
  --popover-foreground: oklch(0.992 0.001 314.215);
  --card: oklch(0.085 0.014 315.676);
  --card-foreground: oklch(0.992 0.001 314.215);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.367 0.177 308.536);
  --primary-foreground: oklch(0.873 0.078 313.727);
  --secondary: oklch(0.196 0.02 313.647);
  --secondary-foreground: oklch(0.734 0.05 313.843);
  --accent: oklch(0.196 0.02 313.647);
  --accent-foreground: oklch(0.734 0.05 313.843);
  --destructive: oklch(0.65 0.212 38.031);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.367 0.177 308.536);
  --chart-1: oklch(0.367 0.177 308.536);
  --chart-2: oklch(0.196 0.02 313.647);
  --chart-3: oklch(0.196 0.02 313.647);
  --chart-4: oklch(0.226 0.026 313.583);
  --chart-5: oklch(0.369 0.18 308.2);
}