Kanagawa for shadcn/ui

Kanagawa is a shadcn/ui theme built around a light yellow primary color (#ddd8bb) with muted deep indigo accents (#404054). The light mode uses an indigo-tinted background (#1f1f28). Dark mode keeps the light yellow primary (#ddd8bb) on an indigo-tinted background (#1f1f28).

Color palette

TokenLightDark
Background
#1f1f28black
#1f1f28black
Foreground
#ddd8bbwheat
#ddd8bbwheat
Card
#1b1b23black
#1b1b23black
Card foreground
#e5e2ccgainsboro
#e5e2ccgainsboro
Popover
#181820black
#181820black
Popover foreground
#eeebddbeige
#eeebddbeige
Primary
#ddd8bbwheat
#ddd8bbwheat
Primary foreground
#443f22darkolivegreen
#443f22darkolivegreen
Secondary
#4e4a31darkolivegreen
#4e4a31darkolivegreen
Secondary foreground
#e2dfd0gainsboro
#e2dfd0gainsboro
Muted
#282833darkslategray
#282833darkslategray
Muted foreground
#a4a4b7darkgray
#a4a4b7darkgray
Accent
#404054darkslategray
#404054darkslategray
Accent foreground
#dfdfe7gainsboro
#dfdfe7gainsboro
Destructive
#f03633crimson
#f03633crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#2f2f32darkslategray
#2f2f32darkslategray
Input
#36363adarkslategray
#36363adarkslategray
Ring
#ddd8bbwheat
#ddd8bbwheat

Contrast

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

Light mode
Text on background11.36:1AAA
Text on card13.15:1AAA
Primary button7.36:1AAA
Secondary button6.67:1AA
Muted text5.91:1AA
Accent7.58:1AAA
Destructive3.98:1AA Large
Dark mode
Text on background11.36:1AAA
Text on card13.15:1AAA
Primary button7.36:1AAA
Secondary button6.67:1AA
Muted text5.91:1AA
Accent7.58:1AAA
Destructive3.98:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.244 0.018 285.022);
  --foreground: oklch(0.878 0.039 98.888);
  --muted: oklch(0.283 0.02 285.046);
  --muted-foreground: oklch(0.724 0.028 285.676);
  --popover: oklch(0.214 0.014 285.133);
  --popover-foreground: oklch(0.939 0.019 98.597);
  --card: oklch(0.224 0.015 285.092);
  --card-foreground: oklch(0.909 0.029 98.742);
  --border: oklch(0.306 0.005 286.091);
  --input: oklch(0.336 0.006 286.081);
  --primary: oklch(0.878 0.039 98.888);
  --primary-foreground: oklch(0.364 0.045 99.496);
  --secondary: oklch(0.406 0.039 99.376);
  --secondary-foreground: oklch(0.901 0.02 98.624);
  --accent: oklch(0.381 0.033 284.747);
  --accent-foreground: oklch(0.907 0.01 286.202);
  --destructive: oklch(0.624 0.221 27.17);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.878 0.039 98.888);
  --chart-1: oklch(0.878 0.039 98.888);
  --chart-2: oklch(0.406 0.039 99.376);
  --chart-3: oklch(0.381 0.033 284.747);
  --chart-4: oklch(0.439 0.043 99.386);
  --chart-5: oklch(0.881 0.042 98.93);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.244 0.018 285.022);
  --foreground: oklch(0.878 0.039 98.888);
  --muted: oklch(0.283 0.02 285.046);
  --muted-foreground: oklch(0.724 0.028 285.676);
  --popover: oklch(0.214 0.014 285.133);
  --popover-foreground: oklch(0.939 0.019 98.597);
  --card: oklch(0.224 0.015 285.092);
  --card-foreground: oklch(0.909 0.029 98.742);
  --border: oklch(0.306 0.005 286.091);
  --input: oklch(0.336 0.006 286.081);
  --primary: oklch(0.878 0.039 98.888);
  --primary-foreground: oklch(0.364 0.045 99.496);
  --secondary: oklch(0.406 0.039 99.376);
  --secondary-foreground: oklch(0.901 0.02 98.624);
  --accent: oklch(0.381 0.033 284.747);
  --accent-foreground: oklch(0.907 0.01 286.202);
  --destructive: oklch(0.624 0.221 27.17);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.878 0.039 98.888);
  --chart-1: oklch(0.878 0.039 98.888);
  --chart-2: oklch(0.406 0.039 99.376);
  --chart-3: oklch(0.381 0.033 284.747);
  --chart-4: oklch(0.439 0.043 99.386);
  --chart-5: oklch(0.881 0.042 98.93);
}