Mob for shadcn/ui

Mob is a shadcn/ui theme built around a light violet primary color (#f1e1f9) with neutral gray accents (#d9d6db). The light mode uses a neutral background (#ffffff). Dark mode keeps the light violet primary (#f1e1f9) on a violet-tinted background (#0b070d).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b070dblack
Foreground
#100416black
#ffffffwhite
Card
#ffffffwhite
#0b070dblack
Card foreground
#100416black
#ffffffwhite
Popover
#ffffffwhite
#0b070dblack
Popover foreground
#100416black
#ffffffwhite
Primary
#f1e1f9lavender
#f1e1f9lavender
Primary foreground
#651c8drebeccapurple
#651c8drebeccapurple
Secondary
#d9d6dbgainsboro
#242226darkslategray
Secondary foreground
#413c44darkslategray
#beb9c1silver
Muted
#e4d6ebgainsboro
#221429black
Muted foreground
#4b464edarkslategray
#b6b1b9silver
Accent
#d9d6dbgainsboro
#242226darkslategray
Accent foreground
#413c44darkslategray
#beb9c1silver
Destructive
#d52401firebrick
#e42701orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f1e1f9lavender
#f1e1f9lavender

Contrast

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

Light mode
Text on background19.98:1AAA
Text on card19.98:1AAA
Primary button8.02:1AAA
Secondary button7.49:1AAA
Muted text6.60:1AA
Accent7.49:1AAA
Destructive5.13:1AA
Dark mode
Text on background19.98:1AAA
Text on card19.98:1AAA
Primary button8.02:1AAA
Secondary button8.20:1AAA
Muted text8.31:1AAA
Accent8.20:1AAA
Destructive4.56:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.14 0.046 313.596);
  --muted: oklch(0.893 0.032 314.025);
  --muted-foreground: oklch(0.403 0.014 314.032);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.14 0.046 313.596);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.14 0.046 313.596);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.93 0.036 314.007);
  --primary-foreground: oklch(0.403 0.175 310.123);
  --secondary: oklch(0.881 0.007 314.176);
  --secondary-foreground: oklch(0.364 0.015 314);
  --accent: oklch(0.881 0.007 314.176);
  --accent-foreground: oklch(0.364 0.015 314);
  --destructive: oklch(0.562 0.213 31.894);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.93 0.036 314.007);
  --chart-1: oklch(0.93 0.036 314.007);
  --chart-2: oklch(0.881 0.007 314.176);
  --chart-3: oklch(0.881 0.007 314.176);
  --chart-4: oklch(0.905 0.006 314.186);
  --chart-5: oklch(0.929 0.038 313.997);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.016 314.24);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.22 0.044 313.059);
  --muted-foreground: oklch(0.768 0.012 314.136);
  --popover: oklch(0.138 0.016 314.24);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.138 0.016 314.24);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.93 0.036 314.007);
  --primary-foreground: oklch(0.403 0.175 310.123);
  --secondary: oklch(0.255 0.009 314.028);
  --secondary-foreground: oklch(0.791 0.012 314.133);
  --accent: oklch(0.255 0.009 314.028);
  --accent-foreground: oklch(0.791 0.012 314.133);
  --destructive: oklch(0.591 0.225 31.805);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.93 0.036 314.007);
  --chart-1: oklch(0.93 0.036 314.007);
  --chart-2: oklch(0.255 0.009 314.028);
  --chart-3: oklch(0.255 0.009 314.028);
  --chart-4: oklch(0.286 0.011 314.017);
  --chart-5: oklch(0.929 0.038 313.997);
}