Truthful for shadcn/ui

Truthful is a shadcn/ui theme built around a muted light indigo primary color (#d8d7e0) with muted light green accents (#d7e0d8). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the muted light indigo primary (#d8d7e0) on an indigo-tinted background (#05050a).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#05050ablack
Foreground
#040316black
#f7f6f8whitesmoke
Card
#f5f4fawhitesmoke
#07070eblack
Card foreground
#040312black
#f9f9fbghostwhite
Popover
#f5f4fawhitesmoke
#07070eblack
Popover foreground
#040312black
#f9f9fbghostwhite
Primary
#d8d7e0gainsboro
#d8d7e0gainsboro
Primary foreground
#3b3a4adarkslategray
#3b3a4adarkslategray
Secondary
#e0d8d7gainsboro
#e0d8d7gainsboro
Secondary foreground
#4a3b3adarkslategray
#4a3b3adarkslategray
Muted
#e5d3d2gainsboro
#2d1b1ablack
Muted foreground
#4d4c4cdarkslategray
#b3b2b2darkgray
Accent
#d7e0d8gainsboro
#d7e0d8gainsboro
Accent foreground
#3a4a3bdarkslategray
#3a4a3bdarkslategray
Destructive
#c11701firebrick
#fe1f01red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d8d7e0gainsboro
#d8d7e0gainsboro

Contrast

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

Light mode
Text on background19.24:1AAA
Text on card18.73:1AAA
Primary button7.77:1AAA
Secondary button7.54:1AAA
Muted text5.93:1AA
Accent6.97:1AA
Destructive6.19:1AA
Dark mode
Text on background18.86:1AAA
Text on card19.11:1AAA
Primary button7.77:1AAA
Secondary button7.54:1AAA
Muted text7.70:1AAA
Accent6.97:1AA
Destructive3.89:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.005 289.378);
  --foreground: oklch(0.12 0.046 281.841);
  --muted: oklch(0.881 0.02 22.482);
  --muted-foreground: oklch(0.417 0.002 22.265);
  --popover: oklch(0.97 0.008 289.325);
  --popover-foreground: oklch(0.11 0.04 282.727);
  --card: oklch(0.97 0.008 289.325);
  --card-foreground: oklch(0.11 0.04 282.727);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.882 0.012 289.229);
  --primary-foreground: oklch(0.357 0.027 287.984);
  --secondary: oklch(0.887 0.009 22.327);
  --secondary-foreground: oklch(0.369 0.021 22.938);
  --accent: oklch(0.897 0.014 147.389);
  --accent-foreground: oklch(0.391 0.032 146.697);
  --destructive: oklch(0.516 0.202 30.799);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.882 0.012 289.229);
  --chart-1: oklch(0.882 0.012 289.229);
  --chart-2: oklch(0.887 0.009 22.327);
  --chart-3: oklch(0.897 0.014 147.389);
  --chart-4: oklch(0.912 0.007 22.3);
  --chart-5: oklch(0.88 0.015 289.165);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.014 287.822);
  --foreground: oklch(0.975 0.002 289.432);
  --muted: oklch(0.247 0.029 23.889);
  --muted-foreground: oklch(0.764 0.002 22.238);
  --popover: oklch(0.132 0.016 287.542);
  --popover-foreground: oklch(0.983 0.002 289.448);
  --card: oklch(0.132 0.016 287.542);
  --card-foreground: oklch(0.983 0.002 289.448);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.882 0.012 289.229);
  --primary-foreground: oklch(0.357 0.027 287.984);
  --secondary: oklch(0.887 0.009 22.327);
  --secondary-foreground: oklch(0.369 0.021 22.938);
  --accent: oklch(0.897 0.014 147.389);
  --accent-foreground: oklch(0.391 0.032 146.697);
  --destructive: oklch(0.633 0.249 30.542);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.882 0.012 289.229);
  --chart-1: oklch(0.882 0.012 289.229);
  --chart-2: oklch(0.887 0.009 22.327);
  --chart-3: oklch(0.897 0.014 147.389);
  --chart-4: oklch(0.912 0.007 22.3);
  --chart-5: oklch(0.88 0.015 289.165);
}