Samurai for shadcn/ui

Samurai is a shadcn/ui theme built around a near-white primary color (#f7f8f8) with near-white accents (#f8f7f7). The light mode uses a neutral background (#f7fcfd). Dark mode keeps the near-white primary (#f7f8f8) on a cyan-tinted background (#050a0b).

Color palette

TokenLightDark
Background
#f7fcfdghostwhite
#050a0bblack
Foreground
#010404black
#f8fbfcghostwhite
Card
#f2fbfcaliceblue
#060d0eblack
Card foreground
#000000black
#fcfdfdwhite
Popover
#f7fcfdghostwhite
#050a0bblack
Popover foreground
#010404black
#f8fbfcghostwhite
Primary
#f7f8f8whitesmoke
#f7f8f8whitesmoke
Primary foreground
#292d2edarkslategray
#292d2edarkslategray
Secondary
#f8f7f7whitesmoke
#f8f7f7whitesmoke
Secondary foreground
#635b5adimgray
#635b5adimgray
Muted
#f2e6e4linen
#1b100dblack
Muted foreground
#675856dimgray
#a99b98darkgray
Accent
#f8f7f7whitesmoke
#f8f7f7whitesmoke
Accent foreground
#635b5adimgray
#635b5adimgray
Destructive
#7f2901saddlebrown
#e94b01orangered
Destructive foreground
#ffcbb3peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f7f8f8whitesmoke
#f7f8f8whitesmoke

Contrast

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

Light mode
Text on background19.90:1AAA
Text on card19.97:1AAA
Primary button13.04:1AAA
Secondary button6.18:1AA
Muted text5.52:1AA
Accent6.18:1AA
Destructive6.52:1AA
Dark mode
Text on background19.18:1AAA
Text on card19.22:1AAA
Primary button13.04:1AAA
Secondary button6.18:1AA
Muted text6.95:1AA
Accent6.18:1AA
Destructive3.83:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.006 209.452);
  --foreground: oklch(0.098 0.012 205.521);
  --muted: oklch(0.933 0.013 29.52);
  --muted-foreground: oklch(0.475 0.019 29.665);
  --popover: oklch(0.988 0.006 209.452);
  --popover-foreground: oklch(0.098 0.012 205.521);
  --card: oklch(0.982 0.009 209.446);
  --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.978 0.001 209.466);
  --primary-foreground: oklch(0.293 0.005 209.433);
  --secondary: oklch(0.977 0.001 29.471);
  --secondary-foreground: oklch(0.478 0.011 29.558);
  --accent: oklch(0.977 0.001 29.471);
  --accent-foreground: oklch(0.478 0.011 29.558);
  --destructive: oklch(0.406 0.127 39.98);
  --destructive-foreground: oklch(0.881 0.067 46.137);
  --ring: oklch(0.978 0.001 209.466);
  --chart-1: oklch(0.978 0.001 209.466);
  --chart-2: oklch(0.977 0.001 29.471);
  --chart-3: oklch(0.977 0.001 29.471);
  --chart-4: oklch(1 0 180);
  --chart-5: oklch(0.978 0.001 209.465);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.137 0.01 207.119);
  --foreground: oklch(0.986 0.003 209.459);
  --muted: oklch(0.186 0.021 30.265);
  --muted-foreground: oklch(0.7 0.017 29.572);
  --popover: oklch(0.137 0.01 207.119);
  --popover-foreground: oklch(0.986 0.003 209.459);
  --card: oklch(0.152 0.011 208.705);
  --card-foreground: oklch(0.993 0.002 209.464);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.978 0.001 209.466);
  --primary-foreground: oklch(0.293 0.005 209.433);
  --secondary: oklch(0.977 0.001 29.471);
  --secondary-foreground: oklch(0.478 0.011 29.558);
  --accent: oklch(0.977 0.001 29.471);
  --accent-foreground: oklch(0.478 0.011 29.558);
  --destructive: oklch(0.63 0.205 38.122);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.978 0.001 209.466);
  --chart-1: oklch(0.978 0.001 209.466);
  --chart-2: oklch(0.977 0.001 29.471);
  --chart-3: oklch(0.977 0.001 29.471);
  --chart-4: oklch(1 0 180);
  --chart-5: oklch(0.978 0.001 209.465);
}