Colorful for shadcn/ui

Colorful is a shadcn/ui theme built around a neutral gray primary color (#9c919c) with muted purple accents (#bbaabb). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the neutral gray primary (#9c919c) on a purple-tinted background (#0c040c).

Color palette

TokenLightDark
Background
#fdfcfdwhite
#0c040cblack
Foreground
#100510black
#fdfcfdwhite
Card
#fdfcfdwhite
#0c040cblack
Card foreground
#100510black
#fdfcfdwhite
Popover
#fdfcfdwhite
#0c040cblack
Popover foreground
#100510black
#fdfcfdwhite
Primary
#9c919cdarkgray
#9c919cdarkgray
Primary foreground
#000000black
#000000black
Secondary
#cdcbcdlightgrey
#252225darkslategray
Secondary foreground
#343234darkslategray
#c0b9c0silver
Muted
#eae1ealavender
#1e151eblack
Muted foreground
#665266dimgray
#ad99addarkgray
Accent
#bbaabbsilver
#3f313fdarkslategray
Accent foreground
#1c171cblack
#d7cbd7lightgrey
Destructive
#dc4909orangered
#f7733btomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9c919cdarkgray
#9c919cdarkgray

Contrast

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

Light mode
Text on background19.49:1AAA
Text on card19.49:1AAA
Primary button6.94:1AA
Secondary button7.89:1AAA
Muted text5.56:1AA
Accent8.06:1AAA
Destructive4.20:1AA Large
Dark mode
Text on background19.80:1AAA
Text on card19.80:1AAA
Primary button6.94:1AA
Secondary button8.19:1AAA
Muted text6.71:1AA
Accent7.78:1AAA
Destructive7.48:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.003 325.596);
  --foreground: oklch(0.139 0.031 327.083);
  --muted: oklch(0.92 0.014 325.69);
  --muted-foreground: oklch(0.465 0.041 326.211);
  --popover: oklch(0.992 0.003 325.596);
  --popover-foreground: oklch(0.139 0.031 327.083);
  --card: oklch(0.992 0.003 325.596);
  --card-foreground: oklch(0.139 0.031 327.083);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.67 0.019 325.791);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.845 0.002 325.592);
  --secondary-foreground: oklch(0.32 0.002 325.63);
  --accent: oklch(0.758 0.03 325.871);
  --accent-foreground: oklch(0.212 0.014 326.052);
  --destructive: oklch(0.606 0.194 38.201);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.67 0.019 325.791);
  --chart-1: oklch(0.67 0.019 325.791);
  --chart-2: oklch(0.845 0.002 325.592);
  --chart-3: oklch(0.758 0.03 325.871);
  --chart-4: oklch(0.868 0.002 325.589);
  --chart-5: oklch(0.667 0.031 325.919);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.027 327.062);
  --foreground: oklch(0.992 0.001 325.585);
  --muted: oklch(0.211 0.02 326.261);
  --muted-foreground: oklch(0.707 0.037 325.96);
  --popover: oklch(0.125 0.027 327.062);
  --popover-foreground: oklch(0.992 0.001 325.585);
  --card: oklch(0.125 0.027 327.062);
  --card-foreground: oklch(0.992 0.001 325.585);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.67 0.019 325.791);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.257 0.008 325.819);
  --secondary-foreground: oklch(0.794 0.012 325.687);
  --accent: oklch(0.334 0.032 326.266);
  --accent-foreground: oklch(0.856 0.021 325.757);
  --destructive: oklch(0.705 0.176 42.058);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.67 0.019 325.791);
  --chart-1: oklch(0.67 0.019 325.791);
  --chart-2: oklch(0.257 0.008 325.819);
  --chart-3: oklch(0.334 0.032 326.266);
  --chart-4: oklch(0.288 0.01 325.832);
  --chart-5: oklch(0.667 0.031 325.919);
}