Base16 Dark Mocha for shadcn/ui

Base16 Dark Mocha is a shadcn/ui theme built around a muted light red primary color (#d1c9c7) with muted orange accents (#675846). The light mode uses an orange-tinted background (#3a3127). Dark mode keeps the muted light red primary (#d1c9c7) on an orange-tinted background (#3a3127).

Color palette

TokenLightDark
Background
#3a3127darkslategray
#3a3127darkslategray
Foreground
#d1c9c7lightgrey
#d1c9c7lightgrey
Card
#342c23darkslategray
#342c23darkslategray
Card foreground
#ddd6d5gainsboro
#ddd6d5gainsboro
Popover
#312921darkslategray
#312921darkslategray
Popover foreground
#e8e4e3gainsboro
#e8e4e3gainsboro
Primary
#d1c9c7lightgrey
#d1c9c7lightgrey
Primary foreground
#38302edarkslategray
#38302edarkslategray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#423b34darkslategray
#423b34darkslategray
Muted foreground
#c2bbb2silver
#c2bbb2silver
Accent
#675846darkolivegreen
#675846darkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#e61414red
#e61414red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#433e38darkslategray
#433e38darkslategray
Input
#4b453fdarkslategray
#4b453fdarkslategray
Ring
#d1c9c7lightgrey
#d1c9c7lightgrey

Contrast

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

Light mode
Text on background7.82:1AAA
Text on card9.59:1AAA
Primary button7.90:1AAA
Secondary button7.37:1AAA
Muted text5.79:1AA
Accent6.86:1AA
Destructive4.69:1AA
Dark mode
Text on background7.82:1AAA
Text on card9.59:1AAA
Primary button7.90:1AAA
Secondary button7.37:1AAA
Muted text5.79:1AA
Accent6.86:1AA
Destructive4.69:1AA

CSS variables

Paste this into your globals.css to use Base16 Dark Mocha in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.32 0.021 70.704);
  --foreground: oklch(0.842 0.01 34.301);
  --muted: oklch(0.357 0.016 71.006);
  --muted-foreground: oklch(0.795 0.015 71.279);
  --popover: oklch(0.287 0.018 70.743);
  --popover-foreground: oklch(0.922 0.005 34.309);
  --card: oklch(0.298 0.019 70.729);
  --card-foreground: oklch(0.882 0.007 34.304);
  --border: oklch(0.365 0.012 71.129);
  --input: oklch(0.395 0.013 71.121);
  --primary: oklch(0.842 0.01 34.301);
  --primary-foreground: oklch(0.317 0.012 34.313);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.47 0.034 70.594);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.586 0.233 28.543);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.842 0.01 34.301);
  --chart-1: oklch(0.842 0.01 34.301);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.47 0.034 70.594);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.841 0.012 34.298);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.32 0.021 70.704);
  --foreground: oklch(0.842 0.01 34.301);
  --muted: oklch(0.357 0.016 71.006);
  --muted-foreground: oklch(0.795 0.015 71.279);
  --popover: oklch(0.287 0.018 70.743);
  --popover-foreground: oklch(0.922 0.005 34.309);
  --card: oklch(0.298 0.019 70.729);
  --card-foreground: oklch(0.882 0.007 34.304);
  --border: oklch(0.365 0.012 71.129);
  --input: oklch(0.395 0.013 71.121);
  --primary: oklch(0.842 0.01 34.301);
  --primary-foreground: oklch(0.317 0.012 34.313);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.47 0.034 70.594);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.586 0.233 28.543);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.842 0.01 34.301);
  --chart-1: oklch(0.842 0.01 34.301);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.47 0.034 70.594);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.841 0.012 34.298);
}