Mantle for shadcn/ui

Mantle is a shadcn/ui theme built around a neutral gray primary color (#bfb5b5) with neutral gray accents (#bfbab5). The light mode uses a neutral background (#fefbfb). Dark mode keeps the neutral gray primary (#bfb5b5) on a red-tinted background (#100505).

Color palette

TokenLightDark
Background
#fefbfbsnow
#100505black
Foreground
#040101black
#ffffffwhite
Card
#fdf7f7snow
#140606black
Card foreground
#000000black
#ffffffwhite
Popover
#fefbfbsnow
#100505black
Popover foreground
#040101black
#ffffffwhite
Primary
#bfb5b5silver
#bfb5b5silver
Primary foreground
#231f1fblack
#231f1fblack
Secondary
#bfb5basilver
#bfb5basilver
Secondary foreground
#231f21black
#231f21black
Muted
#f2e3eblinen
#1c0d14black
Muted foreground
#494145darkslategray
#beb6basilver
Accent
#bfbab5silver
#bfbab5silver
Accent foreground
#23211fblack
#23211fblack
Destructive
#b94813sienna
#ec7b46coral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#bfb5b5silver
#bfb5b5silver

Contrast

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

Light mode
Text on background20.20:1AAA
Text on card19.82:1AAA
Primary button8.17:1AAA
Secondary button8.19:1AAA
Muted text7.97:1AAA
Accent8.34:1AAA
Destructive5.27:1AA
Dark mode
Text on background20.10:1AAA
Text on card19.86:1AAA
Primary button8.17:1AAA
Secondary button8.19:1AAA
Muted text9.48:1AAA
Accent8.34:1AAA
Destructive7.46:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 17.209);
  --foreground: oklch(0.081 0.016 21.329);
  --muted: oklch(0.93 0.02 345.689);
  --muted-foreground: oklch(0.384 0.013 346.014);
  --popover: oklch(0.99 0.003 17.209);
  --popover-foreground: oklch(0.081 0.016 21.329);
  --card: oklch(0.981 0.006 17.261);
  --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.782 0.011 17.391);
  --primary-foreground: oklch(0.244 0.007 17.653);
  --secondary: oklch(0.784 0.013 345.565);
  --secondary-foreground: oklch(0.245 0.008 346.003);
  --accent: oklch(0.792 0.009 67.701);
  --accent-foreground: oklch(0.25 0.006 67.569);
  --destructive: oklch(0.547 0.158 41.172);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.782 0.011 17.391);
  --chart-1: oklch(0.782 0.011 17.391);
  --chart-2: oklch(0.784 0.013 345.565);
  --chart-3: oklch(0.792 0.009 67.701);
  --chart-4: oklch(0.808 0.011 345.504);
  --chart-5: oklch(0.779 0.016 17.496);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.133 0.022 20.498);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.184 0.03 349.08);
  --muted-foreground: oklch(0.784 0.011 345.504);
  --popover: oklch(0.133 0.022 20.498);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.145 0.026 20.745);
  --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.782 0.011 17.391);
  --primary-foreground: oklch(0.244 0.007 17.653);
  --secondary: oklch(0.784 0.013 345.565);
  --secondary-foreground: oklch(0.245 0.008 346.003);
  --accent: oklch(0.792 0.009 67.701);
  --accent-foreground: oklch(0.25 0.006 67.569);
  --destructive: oklch(0.701 0.155 44.148);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.782 0.011 17.391);
  --chart-1: oklch(0.782 0.011 17.391);
  --chart-2: oklch(0.784 0.013 345.565);
  --chart-3: oklch(0.792 0.009 67.701);
  --chart-4: oklch(0.808 0.011 345.504);
  --chart-5: oklch(0.779 0.016 17.496);
}