Mastoid for shadcn/ui

Mastoid is a shadcn/ui theme built around a muted blue primary color (#4c618a) with muted yellow accents (#8a754c). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the muted blue primary (#4c618a) on a blue-tinted background (#04060b).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#04060bblack
Foreground
#000000black
#fcfcfdwhite
Card
#fcfcfdwhite
#04060bblack
Card foreground
#000000black
#fcfcfdwhite
Popover
#fcfcfdwhite
#04060bblack
Popover foreground
#000000black
#fcfcfdwhite
Primary
#4c618adarkslateblue
#4c618adarkslateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#8a754cdimgray
#8a754cdimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#edeae3linen
#1c1912black
Muted foreground
#595959dimgray
#a6a6a6darkgray
Accent
#8a754cdimgray
#8a754cdimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#ae2513firebrick
#ea523etomato
Destructive foreground
#fef7f6snow
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4c618adarkslateblue
#4c618adarkslateblue

Contrast

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

Light mode
Text on background20.49:1AAA
Text on card20.49:1AAA
Primary button6.22:1AA
Secondary button4.41:1AA Large
Muted text5.82:1AA
Accent4.41:1AA Large
Destructive6.42:1AA
Dark mode
Text on background19.73:1AAA
Text on card19.73:1AAA
Primary button6.22:1AA
Secondary button4.41:1AA Large
Muted text7.22:1AAA
Accent4.41:1AA Large
Destructive3.64:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 264.546);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.937 0.01 84.576);
  --muted-foreground: oklch(0.465 0 180);
  --popover: oklch(0.991 0.002 264.546);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.991 0.002 264.546);
  --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.493 0.071 263.589);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.573 0.063 83.987);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.573 0.063 83.987);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.492 0.176 31.041);
  --destructive-foreground: oklch(0.981 0.008 26.494);
  --ring: oklch(0.493 0.071 263.589);
  --chart-1: oklch(0.493 0.071 263.589);
  --chart-2: oklch(0.573 0.063 83.987);
  --chart-3: oklch(0.573 0.063 83.987);
  --chart-4: oklch(0.603 0.067 83.974);
  --chart-5: oklch(0.49 0.079 263.45);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.014 257.779);
  --foreground: oklch(0.992 0.001 264.548);
  --muted: oklch(0.213 0.014 84.502);
  --muted-foreground: oklch(0.724 0 180);
  --popover: oklch(0.123 0.014 257.779);
  --popover-foreground: oklch(0.992 0.001 264.548);
  --card: oklch(0.123 0.014 257.779);
  --card-foreground: oklch(0.992 0.001 264.548);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.493 0.071 263.589);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.573 0.063 83.987);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.573 0.063 83.987);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.642 0.191 30.491);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.493 0.071 263.589);
  --chart-1: oklch(0.493 0.071 263.589);
  --chart-2: oklch(0.573 0.063 83.987);
  --chart-3: oklch(0.573 0.063 83.987);
  --chart-4: oklch(0.603 0.067 83.974);
  --chart-5: oklch(0.49 0.079 263.45);
}