Mortal for shadcn/ui

Mortal is a shadcn/ui theme built around a neutral gray primary color (#949997) with neutral gray accents (#999495). The light mode uses a neutral background (#fbfefd). Dark mode keeps the neutral gray primary (#949997) on a neutral background (#010403).

Color palette

TokenLightDark
Background
#fbfefdwhite
#010403black
Foreground
#051411black
#f5faf9mintcream
Card
#fbfefdwhite
#010403black
Card foreground
#051411black
#f5faf9mintcream
Popover
#fbfefdwhite
#010403black
Popover foreground
#051411black
#f5faf9mintcream
Primary
#949997darkgray
#949997darkgray
Primary foreground
#000000black
#000000black
Secondary
#999495darkgray
#999495darkgray
Secondary foreground
#000000black
#000000black
Muted
#dcd5d7gainsboro
#2a2325darkslategray
Muted foreground
#695d60dimgray
#a29699darkgray
Accent
#999495darkgray
#999495darkgray
Accent foreground
#000000black
#000000black
Destructive
#bb2b11firebrick
#ec4e32tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#949997darkgray
#949997darkgray

Contrast

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

Light mode
Text on background18.58:1AAA
Text on card18.58:1AAA
Primary button7.24:1AAA
Secondary button7.04:1AAA
Muted text4.37:1AA Large
Accent7.04:1AAA
Destructive6.07:1AA
Dark mode
Text on background19.55:1AAA
Text on card19.55:1AAA
Primary button7.24:1AAA
Secondary button7.04:1AAA
Muted text5.40:1AA
Accent7.04:1AAA
Destructive3.69:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.004 179.755);
  --foreground: oklch(0.177 0.024 176.029);
  --muted: oklch(0.88 0.008 0.119);
  --muted-foreground: oklch(0.492 0.016 0.768);
  --popover: oklch(0.995 0.004 179.755);
  --popover-foreground: oklch(0.177 0.024 176.029);
  --card: oklch(0.995 0.004 179.755);
  --card-foreground: oklch(0.177 0.024 176.029);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.678 0.005 179.652);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.672 0.005 0.081);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.672 0.005 0.081);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.518 0.184 32.154);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.678 0.005 179.652);
  --chart-1: oklch(0.678 0.005 179.652);
  --chart-2: oklch(0.672 0.005 0.081);
  --chart-3: oklch(0.672 0.005 0.081);
  --chart-4: oklch(0.697 0.005 0.057);
  --chart-5: oklch(0.682 0.013 179.334);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.009 179.903);
  --foreground: oklch(0.981 0.006 179.698);
  --muted: oklch(0.264 0.011 1.001);
  --muted-foreground: oklch(0.683 0.015 0.467);
  --popover: oklch(0.097 0.009 179.903);
  --popover-foreground: oklch(0.981 0.006 179.698);
  --card: oklch(0.097 0.009 179.903);
  --card-foreground: oklch(0.981 0.006 179.698);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.678 0.005 179.652);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.672 0.005 0.081);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.672 0.005 0.081);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.639 0.199 32.37);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.678 0.005 179.652);
  --chart-1: oklch(0.678 0.005 179.652);
  --chart-2: oklch(0.672 0.005 0.081);
  --chart-3: oklch(0.672 0.005 0.081);
  --chart-4: oklch(0.697 0.005 0.057);
  --chart-5: oklch(0.682 0.013 179.334);
}