Testy for shadcn/ui

Testy is a shadcn/ui theme built around a neutral gray primary color (#8f9a8d) with neutral gray accents (#8d9a92). The light mode uses a neutral background (#f9fcf8). Dark mode keeps the neutral gray primary (#8f9a8d) on a green-tinted background (#050b04).

Color palette

TokenLightDark
Background
#f9fcf8mintcream
#050b04black
Foreground
#030802black
#fcfdfcwhite
Card
#f5faf5whitesmoke
#070f06black
Card foreground
#020401black
#ffffffwhite
Popover
#f9fcf8mintcream
#050b04black
Popover foreground
#030802black
#fcfdfcwhite
Primary
#8f9a8dlightslategray
#8f9a8dlightslategray
Primary foreground
#000000black
#000000black
Secondary
#959a8ddarkseagreen
#959a8ddarkseagreen
Secondary foreground
#000000black
#000000black
Muted
#dfe4d7gainsboro
#23281bblack
Muted foreground
#4b4f45darkslategray
#b6bab0silver
Accent
#8d9a92lightslategray
#8d9a92lightslategray
Accent foreground
#000000black
#000000black
Destructive
#731502maroon
#fb4f2dtomato
Destructive foreground
#fdb8aalightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8f9a8dlightslategray
#8f9a8dlightslategray

Contrast

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

Light mode
Text on background19.47:1AAA
Text on card19.46:1AAA
Primary button7.19:1AAA
Secondary button7.31:1AAA
Muted text6.50:1AA
Accent7.20:1AAA
Destructive6.86:1AA
Dark mode
Text on background19.48:1AAA
Text on card19.46:1AAA
Primary button7.19:1AAA
Secondary button7.31:1AAA
Muted text7.67:1AAA
Accent7.20:1AAA
Destructive3.35:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.005 142.095);
  --foreground: oklch(0.122 0.021 140.541);
  --muted: oklch(0.913 0.019 123.942);
  --muted-foreground: oklch(0.421 0.018 124.263);
  --popover: oklch(0.987 0.005 142.095);
  --popover-foreground: oklch(0.122 0.021 140.541);
  --card: oklch(0.98 0.008 142.085);
  --card-foreground: oklch(0.097 0.016 140.541);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.674 0.023 141.997);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.679 0.019 124.064);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.675 0.019 158.839);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.362 0.131 33.024);
  --destructive-foreground: oklch(0.843 0.084 31.568);
  --ring: oklch(0.674 0.023 141.997);
  --chart-1: oklch(0.674 0.023 141.997);
  --chart-2: oklch(0.679 0.019 124.064);
  --chart-3: oklch(0.675 0.019 158.839);
  --chart-4: oklch(0.703 0.018 124.017);
  --chart-5: oklch(0.679 0.034 141.94);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.021 140.71);
  --foreground: oklch(0.993 0.003 142.104);
  --muted: oklch(0.266 0.025 125.077);
  --muted-foreground: oklch(0.784 0.015 123.925);
  --popover: oklch(0.14 0.021 140.71);
  --popover-foreground: oklch(0.993 0.003 142.104);
  --card: oklch(0.155 0.025 140.895);
  --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.674 0.023 141.997);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.679 0.019 124.064);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.675 0.019 158.839);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.665 0.213 33.153);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.674 0.023 141.997);
  --chart-1: oklch(0.674 0.023 141.997);
  --chart-2: oklch(0.679 0.019 124.064);
  --chart-3: oklch(0.675 0.019 158.839);
  --chart-4: oklch(0.703 0.018 124.017);
  --chart-5: oklch(0.679 0.034 141.94);
}