Disloyal for shadcn/ui

Disloyal is a shadcn/ui theme built around a vivid light violet primary color (#c999fa) with vivid light purple accents (#fa99fa). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light violet primary (#c999fa) on a neutral background (#050208).

Color palette

TokenLightDark
Background
#ffffffwhite
#050208black
Foreground
#0d0515black
#fcfcfdwhite
Card
#fcfcfcsnow
#08030cblack
Card foreground
#0a0411black
#ffffffwhite
Popover
#ffffffwhite
#050208black
Popover foreground
#0d0515black
#fcfcfdwhite
Primary
#c999faplum
#c999faplum
Primary foreground
#30045dmidnightblue
#30045dmidnightblue
Secondary
#9999famediumpurple
#9999famediumpurple
Secondary foreground
#04045dmidnightblue
#04045dmidnightblue
Muted
#d0d0e2lightgrey
#1d1d2fdarkslategray
Muted foreground
#484861darkslategray
#9e9eb7darkgray
Accent
#fa99faviolet
#fa99faviolet
Accent foreground
#5d045dindigo
#5d045dindigo
Destructive
#a62407firebrick
#f75e3btomato
Destructive foreground
#fee7e2mistyrose
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c999faplum
#c999faplum

Contrast

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

Light mode
Text on background20.00:1AAA
Text on card19.78:1AAA
Primary button7.23:1AAA
Secondary button7.00:1AAA
Muted text5.80:1AA
Accent6.69:1AA
Destructive6.14:1AA
Dark mode
Text on background20.08:1AAA
Text on card20.39:1AAA
Primary button7.23:1AAA
Secondary button7.00:1AAA
Muted text6.29:1AA
Accent6.69:1AA
Destructive6.59:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.138 0.038 306.742);
  --muted: oklch(0.863 0.024 285.883);
  --muted-foreground: oklch(0.41 0.042 284.397);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.138 0.038 306.742);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.127 0.033 308.253);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.764 0.144 306.28);
  --primary-foreground: oklch(0.266 0.136 298.339);
  --secondary: oklch(0.723 0.14 282.322);
  --secondary-foreground: oklch(0.224 0.143 266.606);
  --accent: oklch(0.814 0.168 326.978);
  --accent-foreground: oklch(0.337 0.15 328.295);
  --destructive: oklch(0.475 0.17 33.028);
  --destructive-foreground: oklch(0.944 0.026 32.689);
  --ring: oklch(0.764 0.144 306.28);
  --chart-1: oklch(0.764 0.144 306.28);
  --chart-2: oklch(0.723 0.14 282.322);
  --chart-3: oklch(0.814 0.168 326.978);
  --chart-4: oklch(0.762 0.119 283.214);
  --chart-5: oklch(0.762 0.149 306.195);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.102 0.022 310.04);
  --foreground: oklch(0.991 0.003 308.431);
  --muted: oklch(0.242 0.033 283.616);
  --muted-foreground: oklch(0.708 0.037 285.43);
  --popover: oklch(0.102 0.022 310.04);
  --popover-foreground: oklch(0.991 0.003 308.431);
  --card: oklch(0.117 0.026 309.783);
  --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.764 0.144 306.28);
  --primary-foreground: oklch(0.266 0.136 298.339);
  --secondary: oklch(0.723 0.14 282.322);
  --secondary-foreground: oklch(0.224 0.143 266.606);
  --accent: oklch(0.814 0.168 326.978);
  --accent-foreground: oklch(0.337 0.15 328.295);
  --destructive: oklch(0.676 0.195 34.14);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.764 0.144 306.28);
  --chart-1: oklch(0.764 0.144 306.28);
  --chart-2: oklch(0.723 0.14 282.322);
  --chart-3: oklch(0.814 0.168 326.978);
  --chart-4: oklch(0.762 0.119 283.214);
  --chart-5: oklch(0.762 0.149 306.195);
}