Playful for shadcn/ui

Playful is a shadcn/ui theme built around a teal primary color (#1daa8b) with muted light teal accents (#c9d9d6). The light mode uses a neutral background (#fbfefd). Dark mode keeps the teal primary (#1daa8b) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfefdwhite
#000000black
Foreground
#031712black
#f9fbfbghostwhite
Card
#fbfefdwhite
#000000black
Card foreground
#031712black
#f9fbfbghostwhite
Popover
#fbfefdwhite
#000000black
Popover foreground
#031712black
#f9fbfbghostwhite
Primary
#1daa8blightseagreen
#1daa8blightseagreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#c9d9d6lightgrey
#1f2322black
Secondary foreground
#2e423edarkslategray
#b6bebcsilver
Muted
#e9ececlavender
#131615black
Muted foreground
#48514fdarkslategray
#aeb7b5darkgray
Accent
#c9d9d6lightgrey
#1f2322black
Accent foreground
#2e423edarkslategray
#b6bebcsilver
Destructive
#c54d07chocolate
#f87930tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1daa8blightseagreen
#1daa8blightseagreen

Contrast

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

Light mode
Text on background18.20:1AAA
Text on card18.20:1AAA
Primary button2.92:1Fail
Secondary button7.33:1AAA
Muted text6.89:1AA
Accent7.33:1AAA
Destructive4.74:1AA
Dark mode
Text on background20.21:1AAA
Text on card20.21:1AAA
Primary button2.92:1Fail
Secondary button8.36:1AAA
Muted text8.87:1AAA
Accent8.36:1AAA
Destructive7.76:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 181.989);
  --foreground: oklch(0.184 0.029 177.62);
  --muted: oklch(0.941 0.004 181.96);
  --muted-foreground: oklch(0.426 0.012 181.256);
  --popover: oklch(0.994 0.003 181.989);
  --popover-foreground: oklch(0.184 0.029 177.62);
  --card: oklch(0.994 0.003 181.989);
  --card-foreground: oklch(0.184 0.029 177.62);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.661 0.121 173.095);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.873 0.018 181.472);
  --secondary-foreground: oklch(0.361 0.027 179.823);
  --accent: oklch(0.873 0.018 181.472);
  --accent-foreground: oklch(0.361 0.027 179.823);
  --destructive: oklch(0.573 0.168 42.74);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.661 0.121 173.095);
  --chart-1: oklch(0.661 0.121 173.095);
  --chart-2: oklch(0.873 0.018 181.472);
  --chart-3: oklch(0.873 0.018 181.472);
  --chart-4: oklch(0.894 0.015 181.586);
  --chart-5: oklch(0.669 0.124 172.75);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.987 0.003 181.985);
  --muted: oklch(0.197 0.005 181.308);
  --muted-foreground: oklch(0.772 0.011 181.682);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.987 0.003 181.985);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.987 0.003 181.985);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.661 0.121 173.095);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.252 0.006 181.39);
  --secondary-foreground: oklch(0.795 0.009 181.733);
  --accent: oklch(0.252 0.006 181.39);
  --accent-foreground: oklch(0.795 0.009 181.733);
  --destructive: oklch(0.713 0.175 46.834);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.661 0.121 173.095);
  --chart-1: oklch(0.661 0.121 173.095);
  --chart-2: oklch(0.252 0.006 181.39);
  --chart-3: oklch(0.252 0.006 181.39);
  --chart-4: oklch(0.285 0.007 181.351);
  --chart-5: oklch(0.669 0.124 172.75);
}