Mallet for shadcn/ui

Mallet is a shadcn/ui theme built around a light purple primary color (#edcbf6) with light teal accents (#cbf6ed). The light mode uses a neutral background (#fcf7fd). Dark mode keeps the light purple primary (#edcbf6) on a purple-tinted background (#0d050f).

Color palette

TokenLightDark
Background
#fcf7fdghostwhite
#0d050fblack
Foreground
#0b020dblack
#ffffffwhite
Card
#faf3fcghostwhite
#100713black
Card foreground
#070109black
#ffffffwhite
Popover
#faf3fcghostwhite
#100713black
Popover foreground
#070109black
#ffffffwhite
Primary
#edcbf6lavender
#edcbf6lavender
Primary foreground
#651679indigo
#651679indigo
Secondary
#f6edcbblanchedalmond
#f6edcbblanchedalmond
Secondary foreground
#221d06black
#221d06black
Muted
#e1dfd5gainsboro
#2a271edarkslategray
Muted foreground
#52514cdarkslategray
#b3b2addarkgray
Accent
#cbf6edlightcyan
#cbf6edlightcyan
Accent foreground
#06221dblack
#06221dblack
Destructive
#9c1f11firebrick
#d82b18firebrick
Destructive foreground
#fce6e3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#edcbf6lavender
#edcbf6lavender

Contrast

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

Light mode
Text on background19.28:1AAA
Text on card18.94:1AAA
Primary button7.45:1AAA
Secondary button14.35:1AAA
Muted text5.95:1AA
Accent14.26:1AAA
Destructive6.70:1AA
Dark mode
Text on background20.04:1AAA
Text on card19.78:1AAA
Primary button7.45:1AAA
Secondary button14.35:1AAA
Muted text7.01:1AAA
Accent14.26:1AAA
Destructive4.91:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.009 319.447);
  --foreground: oklch(0.118 0.038 321.4);
  --muted: oklch(0.903 0.013 95.203);
  --muted-foreground: oklch(0.434 0.008 95.251);
  --popover: oklch(0.972 0.014 319.448);
  --popover-foreground: oklch(0.103 0.032 321.995);
  --card: oklch(0.972 0.014 319.448);
  --card-foreground: oklch(0.103 0.032 321.995);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.885 0.068 319.463);
  --primary-foreground: oklch(0.383 0.162 318.424);
  --secondary: oklch(0.944 0.045 95.522);
  --secondary-foreground: oklch(0.231 0.038 95.513);
  --accent: oklch(0.94 0.045 181.82);
  --accent-foreground: oklch(0.231 0.036 177.478);
  --destructive: oklch(0.452 0.162 30.48);
  --destructive-foreground: oklch(0.942 0.024 25.221);
  --ring: oklch(0.885 0.068 319.463);
  --chart-1: oklch(0.885 0.068 319.463);
  --chart-2: oklch(0.944 0.045 95.522);
  --chart-3: oklch(0.94 0.045 181.82);
  --chart-4: oklch(0.958 0.034 95.414);
  --chart-5: oklch(0.884 0.07 319.463);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.137 0.026 320.072);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.273 0.017 95.642);
  --muted-foreground: oklch(0.763 0.007 95.145);
  --popover: oklch(0.149 0.03 319.667);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.149 0.03 319.667);
  --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.885 0.068 319.463);
  --primary-foreground: oklch(0.383 0.162 318.424);
  --secondary: oklch(0.944 0.045 95.522);
  --secondary-foreground: oklch(0.231 0.038 95.513);
  --accent: oklch(0.94 0.045 181.82);
  --accent-foreground: oklch(0.231 0.036 177.478);
  --destructive: oklch(0.572 0.21 30.514);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.885 0.068 319.463);
  --chart-1: oklch(0.885 0.068 319.463);
  --chart-2: oklch(0.944 0.045 95.522);
  --chart-3: oklch(0.94 0.045 181.82);
  --chart-4: oklch(0.958 0.034 95.414);
  --chart-5: oklch(0.884 0.07 319.463);
}