Tritone for shadcn/ui

Tritone is a shadcn/ui theme built around a vivid purple primary color (#cb32f5) with vivid purple accents (#f532be). The light mode uses a neutral background (#fbf7fd). Dark mode keeps the vivid purple primary (#cb32f5) on a purple-tinted background (#0a040b).

Color palette

TokenLightDark
Background
#fbf7fdghostwhite
#0a040bblack
Foreground
#040105black
#f8f6f9whitesmoke
Card
#fbf7fdghostwhite
#0a040bblack
Card foreground
#040105black
#f8f6f9whitesmoke
Popover
#fbf7fdghostwhite
#0a040bblack
Popover foreground
#040105black
#f8f6f9whitesmoke
Primary
#cb32f5mediumorchid
#cb32f5mediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#6a32f5blueviolet
#6a32f5blueviolet
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eeebf4lavender
#0d0b14black
Muted foreground
#564e6adimgray
#9d95b1darkgray
Accent
#f532bedeeppink
#f532bedeeppink
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#b31a09firebrick
#f4422ftomato
Destructive foreground
#fef2f0seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cb32f5mediumorchid
#cb32f5mediumorchid

Contrast

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

Light mode
Text on background19.63:1AAA
Text on card19.63:1AAA
Primary button3.94:1AA Large
Secondary button6.18:1AA
Muted text6.62:1AA
Accent3.44:1AA Large
Destructive6.22:1AA
Dark mode
Text on background18.86:1AAA
Text on card18.86:1AAA
Primary button3.94:1AA Large
Secondary button6.18:1AA
Muted text6.85:1AA
Accent3.44:1AA Large
Destructive3.69:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.008 318.888);
  --foreground: oklch(0.081 0.027 321.585);
  --muted: oklch(0.945 0.012 299.084);
  --muted-foreground: oklch(0.443 0.046 297.502);
  --popover: oklch(0.982 0.008 318.888);
  --popover-foreground: oklch(0.081 0.027 321.585);
  --card: oklch(0.982 0.008 318.888);
  --card-foreground: oklch(0.081 0.027 321.585);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.637 0.277 317.397);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.524 0.262 285.997);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.669 0.258 342.691);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.492 0.188 30.477);
  --destructive-foreground: oklch(0.97 0.014 25.108);
  --ring: oklch(0.637 0.277 317.397);
  --chart-1: oklch(0.637 0.277 317.397);
  --chart-2: oklch(0.524 0.262 285.997);
  --chart-3: oklch(0.669 0.258 342.691);
  --chart-4: oklch(0.55 0.25 288.2);
  --chart-5: oklch(0.64 0.283 317.276);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.021 320.24);
  --foreground: oklch(0.975 0.004 318.889);
  --muted: oklch(0.157 0.019 297.167);
  --muted-foreground: oklch(0.687 0.041 298.277);
  --popover: oklch(0.124 0.021 320.24);
  --popover-foreground: oklch(0.975 0.004 318.889);
  --card: oklch(0.124 0.021 320.24);
  --card-foreground: oklch(0.975 0.004 318.889);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.637 0.277 317.397);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.524 0.262 285.997);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.669 0.258 342.691);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.641 0.217 30.257);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.637 0.277 317.397);
  --chart-1: oklch(0.637 0.277 317.397);
  --chart-2: oklch(0.524 0.262 285.997);
  --chart-3: oklch(0.669 0.258 342.691);
  --chart-4: oklch(0.55 0.25 288.2);
  --chart-5: oklch(0.64 0.283 317.276);
}