Playwright for shadcn/ui

Playwright is a shadcn/ui theme built around a muted deep purple primary color (#2e232f) with muted deep teal accents (#232f2e). The light mode uses a neutral background (#fefbfe). Dark mode keeps the muted deep purple primary (#2e232f) on a purple-tinted background (#0a050a).

Color palette

TokenLightDark
Background
#fefbfewhite
#0a050ablack
Foreground
#040104black
#fdfcfdwhite
Card
#fefbfewhite
#0a050ablack
Card foreground
#040104black
#fdfcfdwhite
Popover
#fefbfewhite
#0a050ablack
Popover foreground
#040104black
#fdfcfdwhite
Primary
#2e232fdarkslategray
#2e232fdarkslategray
Primary foreground
#cab9cbsilver
#cab9cbsilver
Secondary
#2f2e23darkslategray
#2f2e23darkslategray
Secondary foreground
#cbcab9silver
#cbcab9silver
Muted
#e1e0d0gainsboro
#2f2e1edarkslategray
Muted foreground
#67665bdimgray
#a4a398darkgray
Accent
#232f2edarkslategray
#232f2edarkslategray
Accent foreground
#b9cbcasilver
#b9cbcasilver
Destructive
#c62115firebrick
#eb493dtomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2e232fdarkslategray
#2e232fdarkslategray

Contrast

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

Light mode
Text on background20.18:1AAA
Text on card20.18:1AAA
Primary button8.11:1AAA
Secondary button8.25:1AAA
Muted text4.35:1AA Large
Accent8.22:1AAA
Destructive5.77:1AA
Dark mode
Text on background19.73:1AAA
Text on card19.73:1AAA
Primary button8.11:1AAA
Secondary button8.25:1AAA
Muted text5.43:1AA
Accent8.22:1AAA
Destructive3.79:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.006 323.666);
  --foreground: oklch(0.083 0.027 325.947);
  --muted: oklch(0.903 0.021 103.49);
  --muted-foreground: oklch(0.507 0.017 103.643);
  --popover: oklch(0.991 0.006 323.666);
  --popover-foreground: oklch(0.083 0.027 325.947);
  --card: oklch(0.991 0.006 323.666);
  --card-foreground: oklch(0.083 0.027 325.947);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.273 0.028 324.136);
  --primary-foreground: oklch(0.804 0.032 323.838);
  --secondary: oklch(0.299 0.02 104.137);
  --secondary-foreground: oklch(0.835 0.023 103.565);
  --accent: oklch(0.293 0.017 191.228);
  --accent-foreground: oklch(0.828 0.02 191.922);
  --destructive: oklch(0.533 0.201 29.605);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.273 0.028 324.136);
  --chart-1: oklch(0.273 0.028 324.136);
  --chart-2: oklch(0.299 0.02 104.137);
  --chart-3: oklch(0.293 0.017 191.228);
  --chart-4: oklch(0.332 0.023 104.171);
  --chart-5: oklch(0.272 0.033 324.23);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.016 324.597);
  --foreground: oklch(0.992 0.002 323.645);
  --muted: oklch(0.296 0.027 104.466);
  --muted-foreground: oklch(0.713 0.015 103.463);
  --popover: oklch(0.127 0.016 324.597);
  --popover-foreground: oklch(0.992 0.002 323.645);
  --card: oklch(0.127 0.016 324.597);
  --card-foreground: oklch(0.992 0.002 323.645);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.273 0.028 324.136);
  --primary-foreground: oklch(0.804 0.032 323.838);
  --secondary: oklch(0.299 0.02 104.137);
  --secondary-foreground: oklch(0.835 0.023 103.565);
  --accent: oklch(0.293 0.017 191.228);
  --accent-foreground: oklch(0.828 0.02 191.922);
  --destructive: oklch(0.633 0.2 28.266);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.273 0.028 324.136);
  --chart-1: oklch(0.273 0.028 324.136);
  --chart-2: oklch(0.299 0.02 104.137);
  --chart-3: oklch(0.293 0.017 191.228);
  --chart-4: oklch(0.332 0.023 104.171);
  --chart-5: oklch(0.272 0.033 324.23);
}