Mechanic for shadcn/ui

Mechanic is a shadcn/ui theme built around a muted pink primary color (#795d65) with muted teal accents (#5d7971). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted pink primary (#795d65) on a pink-tinted background (#0b0506).

Color palette

TokenLightDark
Background
#ffffffwhite
#0b0506black
Foreground
#14060ablack
#ffffffwhite
Card
#fcfcfcsnow
#0e0608black
Card foreground
#100508black
#ffffffwhite
Popover
#fcfcfcsnow
#0e0608black
Popover foreground
#100508black
#ffffffwhite
Primary
#795d65dimgray
#795d65dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#5d7971dimgray
#5d7971dimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e9f2efwhitesmoke
#0d1614black
Muted foreground
#4a4f4ddarkslategray
#b0b5b3darkgray
Accent
#5d7971dimgray
#5d7971dimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#cb0b0bfirebrick
#f42f2fcrimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#795d65dimgray
#795d65dimgray

Contrast

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

Light mode
Text on background19.80:1AAA
Text on card19.62:1AAA
Primary button5.87:1AA
Secondary button4.72:1AA
Muted text7.29:1AAA
Accent4.72:1AA
Destructive5.82:1AA
Dark mode
Text on background20.25:1AAA
Text on card20.00:1AAA
Primary button5.87:1AA
Secondary button4.72:1AA
Muted text8.82:1AAA
Accent4.72:1AA
Destructive3.97:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.147 0.028 0.877);
  --muted: oklch(0.953 0.01 177.407);
  --muted-foreground: oklch(0.422 0.006 177.276);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.134 0.024 359.077);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.134 0.024 359.077);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.51 0.038 359.771);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.552 0.034 175.757);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.552 0.034 175.757);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.533 0.214 28.802);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.51 0.038 359.771);
  --chart-1: oklch(0.51 0.038 359.771);
  --chart-2: oklch(0.552 0.034 175.757);
  --chart-3: oklch(0.552 0.034 175.757);
  --chart-4: oklch(0.58 0.036 175.743);
  --chart-5: oklch(0.506 0.047 0.267);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.014 357.595);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.192 0.014 175.339);
  --muted-foreground: oklch(0.768 0.005 177.507);
  --popover: oklch(0.138 0.016 358.708);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.138 0.016 358.708);
  --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.51 0.038 359.771);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.552 0.034 175.757);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.552 0.034 175.757);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.626 0.23 27.093);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.51 0.038 359.771);
  --chart-1: oklch(0.51 0.038 359.771);
  --chart-2: oklch(0.552 0.034 175.757);
  --chart-3: oklch(0.552 0.034 175.757);
  --chart-4: oklch(0.58 0.036 175.743);
  --chart-5: oklch(0.506 0.047 0.267);
}