Kohlrabi for shadcn/ui

Kohlrabi is a shadcn/ui theme built around a vivid light purple primary color (#f89bf0) with vivid light cyan accents (#9bf0f8). The light mode uses a neutral background (#fefbfe). Dark mode keeps the vivid light purple primary (#f89bf0) on a purple-tinted background (#0b050a).

Color palette

TokenLightDark
Background
#fefbfewhite
#0b050ablack
Foreground
#080208black
#fbf9fbsnow
Card
#fefbfewhite
#0b050ablack
Card foreground
#080208black
#fbf9fbsnow
Popover
#fefbfewhite
#0b050ablack
Popover foreground
#080208black
#fbf9fbsnow
Primary
#f89bf0violet
#f89bf0violet
Primary foreground
#5a0753indigo
#5a0753indigo
Secondary
#f0f89bpalegoldenrod
#f0f89bpalegoldenrod
Secondary foreground
#535a07darkolivegreen
#535a07darkolivegreen
Muted
#e8e9dcgainsboro
#212316black
Muted foreground
#575851dimgray
#aeaea7darkgray
Accent
#9bf0f8paleturquoise
#9bf0f8paleturquoise
Accent foreground
#07535adarkslategray
#07535adarkslategray
Destructive
#7d2e0csaddlebrown
#e95c20chocolate
Destructive foreground
#f9d3c3peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f89bf0violet
#f89bf0violet

Contrast

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

Light mode
Text on background19.96:1AAA
Text on card19.96:1AAA
Primary button6.88:1AA
Secondary button6.54:1AA
Muted text5.88:1AA
Accent6.76:1AA
Destructive6.64:1AA
Dark mode
Text on background19.30:1AAA
Text on card19.30:1AAA
Primary button6.88:1AA
Secondary button6.54:1AA
Muted text7.17:1AAA
Accent6.76:1AA
Destructive6.03:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.006 328.122);
  --foreground: oklch(0.108 0.026 329.474);
  --muted: oklch(0.931 0.017 110.591);
  --muted-foreground: oklch(0.456 0.011 110.683);
  --popover: oklch(0.991 0.006 328.122);
  --popover-foreground: oklch(0.108 0.026 329.474);
  --card: oklch(0.991 0.006 328.122);
  --card-foreground: oklch(0.108 0.026 329.474);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.811 0.152 329.862);
  --primary-foreground: oklch(0.328 0.14 332.329);
  --secondary: oklch(0.952 0.115 112.459);
  --secondary-foreground: oklch(0.447 0.098 114.911);
  --accent: oklch(0.903 0.082 203.126);
  --accent-foreground: oklch(0.405 0.067 204.923);
  --destructive: oklch(0.412 0.118 40.499);
  --destructive-foreground: oklch(0.895 0.048 44.517);
  --ring: oklch(0.811 0.152 329.862);
  --chart-1: oklch(0.811 0.152 329.862);
  --chart-2: oklch(0.952 0.115 112.459);
  --chart-3: oklch(0.903 0.082 203.126);
  --chart-4: oklch(0.958 0.1 112.153);
  --chart-5: oklch(0.811 0.157 329.918);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.019 329.016);
  --foreground: oklch(0.984 0.003 328.095);
  --muted: oklch(0.249 0.023 111.943);
  --muted-foreground: oklch(0.749 0.009 110.483);
  --popover: oklch(0.127 0.019 329.016);
  --popover-foreground: oklch(0.984 0.003 328.095);
  --card: oklch(0.127 0.019 329.016);
  --card-foreground: oklch(0.984 0.003 328.095);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.811 0.152 329.862);
  --primary-foreground: oklch(0.328 0.14 332.329);
  --secondary: oklch(0.952 0.115 112.459);
  --secondary-foreground: oklch(0.447 0.098 114.911);
  --accent: oklch(0.903 0.082 203.126);
  --accent-foreground: oklch(0.405 0.067 204.923);
  --destructive: oklch(0.651 0.187 40.45);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.811 0.152 329.862);
  --chart-1: oklch(0.811 0.152 329.862);
  --chart-2: oklch(0.952 0.115 112.459);
  --chart-3: oklch(0.903 0.082 203.126);
  --chart-4: oklch(0.958 0.1 112.153);
  --chart-5: oklch(0.811 0.157 329.918);
}