True for shadcn/ui

True is a shadcn/ui theme built around a purple primary color (#c56bd1) with teal accents (#6bd1c5). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the purple primary (#c56bd1) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfbfewhite
#000000black
Foreground
#040104black
#ffffffwhite
Card
#fdfbfewhite
#000000black
Card foreground
#040104black
#ffffffwhite
Popover
#fdfbfewhite
#000000black
Popover foreground
#040104black
#ffffffwhite
Primary
#c56bd1orchid
#c56bd1orchid
Primary foreground
#070208black
#070208black
Secondary
#d1c56bdarkkhaki
#d1c56bdarkkhaki
Secondary foreground
#080702black
#080702black
Muted
#e6e4d6gainsboro
#292819black
Muted foreground
#59584fdimgray
#b0afa6darkgray
Accent
#6bd1c5mediumaquamarine
#6bd1c5mediumaquamarine
Accent foreground
#020807black
#020807black
Destructive
#d94a0dchocolate
#f36a30tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c56bd1orchid
#c56bd1orchid

Contrast

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

Light mode
Text on background20.22:1AAA
Text on card20.22:1AAA
Primary button6.27:1AA
Secondary button11.48:1AAA
Muted text5.60:1AA
Accent11.14:1AAA
Destructive4.26:1AA Large
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button6.27:1AA
Secondary button11.48:1AAA
Muted text6.77:1AA
Accent11.14:1AAA
Destructive6.92:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 322.126);
  --foreground: oklch(0.083 0.025 324.422);
  --muted: oklch(0.917 0.02 100.651);
  --muted-foreground: oklch(0.459 0.014 100.786);
  --popover: oklch(0.991 0.004 322.126);
  --popover-foreground: oklch(0.083 0.025 324.422);
  --card: oklch(0.991 0.004 322.126);
  --card-foreground: oklch(0.083 0.025 324.422);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.668 0.173 322.805);
  --primary-foreground: oklch(0.108 0.023 323.791);
  --secondary: oklch(0.816 0.113 101.836);
  --secondary-foreground: oklch(0.128 0.016 103.518);
  --accent: oklch(0.797 0.098 185.476);
  --accent-foreground: oklch(0.124 0.013 188.299);
  --destructive: oklch(0.602 0.189 38.672);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.668 0.173 322.805);
  --chart-1: oklch(0.668 0.173 322.805);
  --chart-2: oklch(0.816 0.113 101.836);
  --chart-3: oklch(0.797 0.098 185.476);
  --chart-4: oklch(0.83 0.106 101.789);
  --chart-5: oklch(0.668 0.182 322.822);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.272 0.025 101.532);
  --muted-foreground: oklch(0.752 0.013 100.583);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.668 0.173 322.805);
  --primary-foreground: oklch(0.108 0.023 323.791);
  --secondary: oklch(0.816 0.113 101.836);
  --secondary-foreground: oklch(0.128 0.016 103.518);
  --accent: oklch(0.797 0.098 185.476);
  --accent-foreground: oklch(0.124 0.013 188.299);
  --destructive: oklch(0.685 0.182 41.456);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.668 0.173 322.805);
  --chart-1: oklch(0.668 0.173 322.805);
  --chart-2: oklch(0.816 0.113 101.836);
  --chart-3: oklch(0.797 0.098 185.476);
  --chart-4: oklch(0.83 0.106 101.789);
  --chart-5: oklch(0.668 0.182 322.822);
}