Mug for shadcn/ui

Mug is a shadcn/ui theme built around a blue primary color (#282f71) with green accents (#2f7128). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#282f71) on a blue-tinted background (#05060f).

Color palette

TokenLightDark
Background
#ffffffwhite
#05060fblack
Foreground
#000000black
#fcfcfdwhite
Card
#fcfcfcsnow
#060813black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#05060fblack
Popover foreground
#000000black
#fcfcfdwhite
Primary
#282f71midnightblue
#282f71midnightblue
Primary foreground
#d9dcf2lavender
#d9dcf2lavender
Secondary
#71282fsaddlebrown
#71282fsaddlebrown
Secondary foreground
#f2d9dcmistyrose
#f2d9dcmistyrose
Muted
#e1d0d2lightgrey
#2f1e20black
Muted foreground
#5c5c5cdimgray
#a3a3a3darkgray
Accent
#2f7128forestgreen
#2f7128forestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#aa1b08firebrick
#f53c24orangered
Destructive foreground
#fee9e7mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#282f71midnightblue
#282f71midnightblue

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button8.90:1AAA
Secondary button7.68:1AAA
Muted text4.51:1AA
Accent5.95:1AA
Destructive6.25:1AA
Dark mode
Text on background19.69:1AAA
Text on card19.99:1AAA
Primary button8.90:1AAA
Secondary button7.68:1AAA
Muted text6.28:1AA
Accent5.95:1AA
Destructive3.78:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.873 0.019 10.569);
  --muted-foreground: oklch(0.474 0 198.435);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.34 0.113 273.967);
  --primary-foreground: oklch(0.898 0.03 280.726);
  --secondary: oklch(0.387 0.104 17.464);
  --secondary-foreground: oklch(0.907 0.027 10.762);
  --accent: oklch(0.489 0.127 141.691);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.476 0.18 30.909);
  --destructive-foreground: oklch(0.951 0.023 26.615);
  --ring: oklch(0.34 0.113 273.967);
  --chart-1: oklch(0.34 0.113 273.967);
  --chart-2: oklch(0.387 0.104 17.464);
  --chart-3: oklch(0.489 0.127 141.691);
  --chart-4: oklch(0.413 0.112 17.599);
  --chart-5: oklch(0.337 0.12 273.323);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.022 276.293);
  --foreground: oklch(0.991 0.002 281.255);
  --muted: oklch(0.256 0.027 12.487);
  --muted-foreground: oklch(0.716 0 165.964);
  --popover: oklch(0.127 0.022 276.293);
  --popover-foreground: oklch(0.991 0.002 281.255);
  --card: oklch(0.137 0.026 276.491);
  --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.34 0.113 273.967);
  --primary-foreground: oklch(0.898 0.03 280.726);
  --secondary: oklch(0.387 0.104 17.464);
  --secondary-foreground: oklch(0.907 0.027 10.762);
  --accent: oklch(0.489 0.127 141.691);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.636 0.223 31.034);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.34 0.113 273.967);
  --chart-1: oklch(0.34 0.113 273.967);
  --chart-2: oklch(0.387 0.104 17.464);
  --chart-3: oklch(0.489 0.127 141.691);
  --chart-4: oklch(0.413 0.112 17.599);
  --chart-5: oklch(0.337 0.12 273.323);
}