Samurai for shadcn/ui

Samurai is a shadcn/ui theme built around a light purple primary color (#e4c7ea) with muted purple accents (#c4b1c8). The light mode uses a neutral background (#ffffff). Dark mode keeps the light purple primary (#e4c7ea) on a neutral background (#070307).

Color palette

TokenLightDark
Background
#ffffffwhite
#070307black
Foreground
#0d050fblack
#f9f5faghostwhite
Card
#ffffffwhite
#070307black
Card foreground
#0d050fblack
#f9f5faghostwhite
Popover
#ffffffwhite
#070307black
Popover foreground
#0d050fblack
#f9f5faghostwhite
Primary
#e4c7eathistle
#e4c7eathistle
Primary foreground
#52225dindigo
#52225dindigo
Secondary
#d3cdd5lightgrey
#151315black
Secondary foreground
#3b343ddarkslategray
#b0a9b1darkgray
Muted
#f3ebf5whitesmoke
#120a14black
Muted foreground
#5f5d5fdimgray
#a1a0a2darkgray
Accent
#c4b1c8silver
#29222adarkslategray
Accent foreground
#281e2adarkslategray
#c4b8c6silver
Destructive
#5f0707maroon
#f14141tomato
Destructive foreground
#f8a0a0lightsalmon
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e4c7eathistle
#e4c7eathistle

Contrast

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

Light mode
Text on background20.08:1AAA
Text on card20.08:1AAA
Primary button7.83:1AAA
Secondary button7.74:1AAA
Muted text5.58:1AA
Accent8.01:1AAA
Destructive6.92:1AA
Dark mode
Text on background19.01:1AAA
Text on card19.01:1AAA
Primary button7.83:1AAA
Secondary button8.03:1AAA
Muted text7.45:1AAA
Accent8.11:1AAA
Destructive3.77:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.136 0.029 320.752);
  --muted: oklch(0.948 0.016 320.007);
  --muted-foreground: oklch(0.482 0.004 319.998);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.136 0.029 320.752);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.136 0.029 320.752);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.865 0.057 320.049);
  --primary-foreground: oklch(0.349 0.11 319.935);
  --secondary: oklch(0.857 0.012 320.004);
  --secondary-foreground: oklch(0.335 0.018 320.04);
  --accent: oklch(0.784 0.037 320.034);
  --accent-foreground: oklch(0.251 0.027 320.077);
  --destructive: oklch(0.31 0.119 27.835);
  --destructive-foreground: oklch(0.794 0.105 19.659);
  --ring: oklch(0.865 0.057 320.049);
  --chart-1: oklch(0.865 0.057 320.049);
  --chart-2: oklch(0.857 0.012 320.004);
  --chart-3: oklch(0.784 0.037 320.034);
  --chart-4: oklch(0.881 0.01 320.001);
  --chart-5: oklch(0.864 0.061 320.052);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.02 321.508);
  --foreground: oklch(0.974 0.008 319.999);
  --muted: oklch(0.163 0.025 320.095);
  --muted-foreground: oklch(0.707 0.003 319.995);
  --popover: oklch(0.108 0.02 321.508);
  --popover-foreground: oklch(0.974 0.008 319.999);
  --card: oklch(0.108 0.02 321.508);
  --card-foreground: oklch(0.974 0.008 319.999);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.865 0.057 320.049);
  --primary-foreground: oklch(0.349 0.11 319.935);
  --secondary: oklch(0.191 0.005 320.014);
  --secondary-foreground: oklch(0.744 0.014 320.008);
  --accent: oklch(0.263 0.018 320.052);
  --accent-foreground: oklch(0.797 0.023 320.018);
  --destructive: oklch(0.637 0.212 25.596);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.865 0.057 320.049);
  --chart-1: oklch(0.865 0.057 320.049);
  --chart-2: oklch(0.191 0.005 320.014);
  --chart-3: oklch(0.263 0.018 320.052);
  --chart-4: oklch(0.224 0.006 320.017);
  --chart-5: oklch(0.864 0.061 320.052);
}