Miter for shadcn/ui

Miter is a shadcn/ui theme built around a light purple primary color (#e7d0e2) with light cyan accents (#d0e2e7). The light mode uses a neutral background (#fdf7fc). Dark mode keeps the light purple primary (#e7d0e2) on a purple-tinted background (#0f050d).

Color palette

TokenLightDark
Background
#fdf7fcsnow
#0f050dblack
Foreground
#000000black
#f9f6f8whitesmoke
Card
#fcf2falavenderblush
#130710black
Card foreground
#000000black
#fbf9fbsnow
Popover
#fcf2falavenderblush
#130710black
Popover foreground
#000000black
#fbf9fbsnow
Primary
#e7d0e2gainsboro
#e7d0e2gainsboro
Primary foreground
#582c4fdarkslategray
#582c4fdarkslategray
Secondary
#e2e7d0gainsboro
#e2e7d0gainsboro
Secondary foreground
#12140ablack
#12140ablack
Muted
#e3e5dcgainsboro
#22231ablack
Muted foreground
#606255dimgray
#a7aa9ddarkgray
Accent
#d0e2e7gainsboro
#d0e2e7gainsboro
Accent foreground
#2c4f58darkslategray
#2c4f58darkslategray
Destructive
#6f1d01maroon
#fd4508orangered
Destructive foreground
#febba4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e7d0e2gainsboro
#e7d0e2gainsboro

Contrast

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

Light mode
Text on background19.84:1AAA
Text on card19.28:1AAA
Primary button7.66:1AAA
Secondary button14.68:1AAA
Muted text4.90:1AA
Accent6.65:1AA
Destructive6.95:1AA
Dark mode
Text on background18.64:1AAA
Text on card18.84:1AAA
Primary button7.66:1AAA
Secondary button14.68:1AAA
Muted text6.68:1AA
Accent6.65:1AA
Destructive3.49:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.01 332.155);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.919 0.013 115.843);
  --muted-foreground: oklch(0.491 0.02 116.333);
  --popover: oklch(0.972 0.015 332.232);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.972 0.015 332.232);
  --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.881 0.036 332.602);
  --primary-foreground: oklch(0.366 0.081 335.047);
  --secondary: oklch(0.918 0.032 116.212);
  --secondary-foreground: oklch(0.187 0.02 117.536);
  --accent: oklch(0.901 0.021 214.402);
  --accent-foreground: oklch(0.406 0.043 215.597);
  --destructive: oklch(0.362 0.121 36.748);
  --destructive-foreground: oklch(0.848 0.085 39.216);
  --ring: oklch(0.881 0.036 332.602);
  --chart-1: oklch(0.881 0.036 332.602);
  --chart-2: oklch(0.918 0.032 116.212);
  --chart-3: oklch(0.901 0.021 214.402);
  --chart-4: oklch(0.936 0.025 116.065);
  --chart-5: oklch(0.88 0.039 332.656);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.026 333.899);
  --foreground: oklch(0.975 0.005 332.082);
  --muted: oklch(0.253 0.018 116.887);
  --muted-foreground: oklch(0.731 0.018 116.039);
  --popover: oklch(0.151 0.03 334.461);
  --popover-foreground: oklch(0.984 0.003 332.056);
  --card: oklch(0.151 0.03 334.461);
  --card-foreground: oklch(0.984 0.003 332.056);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.881 0.036 332.602);
  --primary-foreground: oklch(0.366 0.081 335.047);
  --secondary: oklch(0.918 0.032 116.212);
  --secondary-foreground: oklch(0.187 0.02 117.536);
  --accent: oklch(0.901 0.021 214.402);
  --accent-foreground: oklch(0.406 0.043 215.597);
  --destructive: oklch(0.656 0.227 35.093);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.881 0.036 332.602);
  --chart-1: oklch(0.881 0.036 332.602);
  --chart-2: oklch(0.918 0.032 116.212);
  --chart-3: oklch(0.901 0.021 214.402);
  --chart-4: oklch(0.936 0.025 116.065);
  --chart-5: oklch(0.88 0.039 332.656);
}