Spellbound for shadcn/ui

Spellbound is a shadcn/ui theme built around a vivid violet primary color (#9b3dff) with muted light violet accents (#d4d0d7). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the vivid violet primary (#9b3dff) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#000000black
Foreground
#0a0311black
#faf8fcghostwhite
Card
#fcfcfdwhite
#000000black
Card foreground
#0a0311black
#faf8fcghostwhite
Popover
#fcfcfdwhite
#000000black
Popover foreground
#0a0311black
#faf8fcghostwhite
Primary
#9b3dffblueviolet
#9b3dffblueviolet
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#ebeaeblavender
#211e25black
Secondary foreground
#525053darkslategray
#bfb8c6silver
Muted
#f2f1f3whitesmoke
#0d0c0eblack
Muted foreground
#635c6adimgray
#9b95a3darkgray
Accent
#d4d0d7lightgrey
#40344cdarkslategray
Accent foreground
#3a363fdarkslategray
#cec5d8thistle
Destructive
#832e0csaddlebrown
#ea551achocolate
Destructive foreground
#fad5c7peachpuff
#ffffffwhite
Border
#edebeflavender
#1c191fblack
Input
#edebeflavender
#1c191fblack
Ring
#9b3dffblueviolet
#9b3dffblueviolet

Contrast

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

Light mode
Text on background19.78:1AAA
Text on card19.78:1AAA
Primary button4.65:1AA
Secondary button6.65:1AA
Muted text5.72:1AA
Accent7.76:1AAA
Destructive6.55:1AA
Dark mode
Text on background19.89:1AAA
Text on card19.89:1AAA
Primary button4.65:1AA
Secondary button8.54:1AAA
Muted text6.71:1AA
Accent6.92:1AA
Destructive3.61:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 307.762);
  --foreground: oklch(0.124 0.038 307.567);
  --muted: oklch(0.961 0.002 307.763);
  --muted-foreground: oklch(0.488 0.023 307.23);
  --popover: oklch(0.991 0.002 307.762);
  --popover-foreground: oklch(0.124 0.038 307.567);
  --card: oklch(0.991 0.002 307.762);
  --card-foreground: oklch(0.124 0.038 307.567);
  --border: oklch(0.943 0.006 307.713);
  --input: oklch(0.943 0.006 307.713);
  --primary: oklch(0.593 0.264 300.126);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.938 0.001 307.775);
  --secondary-foreground: oklch(0.434 0.006 307.637);
  --accent: oklch(0.863 0.01 307.652);
  --accent-foreground: oklch(0.341 0.017 307.2);
  --destructive: oklch(0.421 0.125 39.199);
  --destructive-foreground: oklch(0.901 0.045 42.759);
  --ring: oklch(0.593 0.264 300.126);
  --chart-1: oklch(0.593 0.264 300.126);
  --chart-2: oklch(0.938 0.001 307.775);
  --chart-3: oklch(0.863 0.01 307.652);
  --chart-4: oklch(0.961 0.001 307.78);
  --chart-5: oklch(0.592 0.27 299.779);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.982 0.005 307.727);
  --muted: oklch(0.156 0.003 307.533);
  --muted-foreground: oklch(0.679 0.022 307.419);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.982 0.005 307.727);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.982 0.005 307.727);
  --border: oklch(0.219 0.014 307.053);
  --input: oklch(0.219 0.014 307.053);
  --primary: oklch(0.593 0.264 300.126);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.241 0.015 307.044);
  --secondary-foreground: oklch(0.793 0.021 307.482);
  --accent: oklch(0.349 0.044 306.307);
  --accent-foreground: oklch(0.836 0.028 307.392);
  --destructive: oklch(0.643 0.195 38.824);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.593 0.264 300.126);
  --chart-1: oklch(0.593 0.264 300.126);
  --chart-2: oklch(0.241 0.015 307.044);
  --chart-3: oklch(0.349 0.044 306.307);
  --chart-4: oklch(0.271 0.018 306.998);
  --chart-5: oklch(0.592 0.27 299.779);
}