Differential for shadcn/ui

Differential is a shadcn/ui theme built around a muted teal primary color (#a6bab9) with muted yellow accents (#bab9a6). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted teal primary (#a6bab9) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#041010black
#f6f8f8whitesmoke
Card
#ffffffwhite
#000000black
Card foreground
#041010black
#f6f8f8whitesmoke
Popover
#ffffffwhite
#000000black
Popover foreground
#041010black
#f6f8f8whitesmoke
Primary
#a6bab9darkgray
#a6bab9darkgray
Primary foreground
#141a1ablack
#141a1ablack
Secondary
#b9a6badarkgray
#b9a6badarkgray
Secondary foreground
#1a141ablack
#1a141ablack
Muted
#dfd7e0gainsboro
#281f28darkslategray
Muted foreground
#575757dimgray
#a8a8a8darkgray
Accent
#bab9a6darkgray
#bab9a6darkgray
Accent foreground
#1a1a14black
#1a1a14black
Destructive
#af2e0efirebrick
#e73d13orangered
Destructive foreground
#fef3f1seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a6bab9darkgray
#a6bab9darkgray

Contrast

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

Light mode
Text on background19.32:1AAA
Text on card19.32:1AAA
Primary button8.68:1AAA
Secondary button7.94:1AAA
Muted text5.13:1AA
Accent8.81:1AAA
Destructive6.00:1AA
Dark mode
Text on background19.70:1AAA
Text on card19.70:1AAA
Primary button8.68:1AAA
Secondary button7.94:1AAA
Muted text6.70:1AA
Accent8.81:1AAA
Destructive4.13:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.162 0.02 191.578);
  --muted: oklch(0.888 0.016 324.232);
  --muted-foreground: oklch(0.456 0 180);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.162 0.02 191.578);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.162 0.02 191.578);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.774 0.023 193.03);
  --primary-foreground: oklch(0.211 0.009 192.77);
  --secondary: oklch(0.747 0.036 324.407);
  --secondary-foreground: oklch(0.201 0.015 324.54);
  --accent: oklch(0.782 0.027 104.546);
  --accent-foreground: oklch(0.214 0.011 104.791);
  --destructive: oklch(0.499 0.17 34.12);
  --destructive-foreground: oklch(0.973 0.012 34.3);
  --ring: oklch(0.774 0.023 193.03);
  --chart-1: oklch(0.774 0.023 193.03);
  --chart-2: oklch(0.747 0.036 324.407);
  --chart-3: oklch(0.782 0.027 104.546);
  --chart-4: oklch(0.772 0.033 324.371);
  --chart-5: oklch(0.778 0.028 192.906);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.979 0.002 193.558);
  --muted: oklch(0.254 0.021 324.602);
  --muted-foreground: oklch(0.733 0 180);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.979 0.002 193.558);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.979 0.002 193.558);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.774 0.023 193.03);
  --primary-foreground: oklch(0.211 0.009 192.77);
  --secondary: oklch(0.747 0.036 324.407);
  --secondary-foreground: oklch(0.201 0.015 324.54);
  --accent: oklch(0.782 0.027 104.546);
  --accent-foreground: oklch(0.214 0.011 104.791);
  --destructive: oklch(0.613 0.212 33.905);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.774 0.023 193.03);
  --chart-1: oklch(0.774 0.023 193.03);
  --chart-2: oklch(0.747 0.036 324.407);
  --chart-3: oklch(0.782 0.027 104.546);
  --chart-4: oklch(0.772 0.033 324.371);
  --chart-5: oklch(0.778 0.028 192.906);
}