Testy for shadcn/ui

Testy is a shadcn/ui theme built around a violet primary color (#472c7d) with purple accents (#6f2c7d). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the violet primary (#472c7d) on a violet-tinted background (#06040c).

Color palette

TokenLightDark
Background
#f9f8fcghostwhite
#06040cblack
Foreground
#06020eblack
#ffffffwhite
Card
#f9f8fcghostwhite
#06040cblack
Card foreground
#06020eblack
#ffffffwhite
Popover
#f9f8fcghostwhite
#06040cblack
Popover foreground
#06020eblack
#ffffffwhite
Primary
#472c7ddarkslateblue
#472c7ddarkslateblue
Primary foreground
#eae5f6lavender
#eae5f6lavender
Secondary
#2c397ddarkslateblue
#2c397ddarkslateblue
Secondary foreground
#e5e7f6lavender
#e5e7f6lavender
Muted
#dee0edlavender
#121421black
Muted foreground
#373a49darkslategray
#b6b9c8silver
Accent
#6f2c7drebeccapurple
#6f2c7drebeccapurple
Accent foreground
#f3e5f6lavender
#f3e5f6lavender
Destructive
#842e06saddlebrown
#f66c2ctomato
Destructive foreground
#fcd3bfpeachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#472c7ddarkslateblue
#472c7ddarkslateblue

Contrast

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

Light mode
Text on background19.43:1AAA
Text on card19.43:1AAA
Primary button8.89:1AAA
Secondary button8.59:1AAA
Muted text8.58:1AAA
Accent7.45:1AAA
Destructive6.41:1AA
Dark mode
Text on background20.40:1AAA
Text on card20.40:1AAA
Primary button8.89:1AAA
Secondary button8.59:1AAA
Muted text9.36:1AAA
Accent7.45:1AAA
Destructive7.12:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.005 301.411);
  --foreground: oklch(0.105 0.037 301.783);
  --muted: oklch(0.909 0.018 276.978);
  --muted-foreground: oklch(0.351 0.026 276.109);
  --popover: oklch(0.981 0.005 301.411);
  --popover-foreground: oklch(0.105 0.037 301.783);
  --card: oklch(0.981 0.005 301.411);
  --card-foreground: oklch(0.105 0.037 301.783);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.372 0.131 294.534);
  --primary-foreground: oklch(0.93 0.024 301.082);
  --secondary: oklch(0.374 0.115 271.295);
  --secondary-foreground: oklch(0.931 0.02 276.963);
  --accent: oklch(0.423 0.143 320.622);
  --accent-foreground: oklch(0.937 0.027 320.576);
  --destructive: oklch(0.423 0.127 40.38);
  --destructive-foreground: oklch(0.896 0.054 46.273);
  --ring: oklch(0.372 0.131 294.534);
  --chart-1: oklch(0.372 0.131 294.534);
  --chart-2: oklch(0.374 0.115 271.295);
  --chart-3: oklch(0.423 0.143 320.622);
  --chart-4: oklch(0.396 0.123 271.198);
  --chart-5: oklch(0.369 0.137 293.907);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.116 0.023 301.828);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.196 0.027 274.973);
  --muted-foreground: oklch(0.789 0.021 276.875);
  --popover: oklch(0.116 0.023 301.828);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.116 0.023 301.828);
  --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.372 0.131 294.534);
  --primary-foreground: oklch(0.93 0.024 301.082);
  --secondary: oklch(0.374 0.115 271.295);
  --secondary-foreground: oklch(0.931 0.02 276.963);
  --accent: oklch(0.423 0.143 320.622);
  --accent-foreground: oklch(0.937 0.027 320.576);
  --destructive: oklch(0.693 0.185 42.432);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.372 0.131 294.534);
  --chart-1: oklch(0.372 0.131 294.534);
  --chart-2: oklch(0.374 0.115 271.295);
  --chart-3: oklch(0.423 0.143 320.622);
  --chart-4: oklch(0.396 0.123 271.198);
  --chart-5: oklch(0.369 0.137 293.907);
}