Colorful for shadcn/ui

Colorful is a shadcn/ui theme built around a violet primary color (#b49ada) with purple accents (#d39ada). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the violet primary (#b49ada) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#fcfbfewhite
#020104black
Foreground
#0b0415black
#f7f6f9whitesmoke
Card
#fcfbfewhite
#020104black
Card foreground
#0b0415black
#f7f6f9whitesmoke
Popover
#fcfbfewhite
#020104black
Popover foreground
#0b0415black
#f7f6f9whitesmoke
Primary
#b49adaplum
#b49adaplum
Primary foreground
#1e1230black
#1e1230black
Secondary
#9aa1dalightsteelblue
#9aa1dalightsteelblue
Secondary foreground
#121530black
#121530black
Muted
#e5e5eblavender
#14141ablack
Muted foreground
#565761dimgray
#9e9fa9darkgray
Accent
#d39adaplum
#d39adaplum
Accent foreground
#2d1230midnightblue
#2d1230midnightblue
Destructive
#cf200cfirebrick
#f4503etomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b49adaplum
#b49adaplum

Contrast

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

Light mode
Text on background19.56:1AAA
Text on card19.56:1AAA
Primary button7.26:1AAA
Secondary button7.21:1AAA
Muted text5.71:1AA
Accent7.61:1AAA
Destructive5.43:1AA
Dark mode
Text on background19.31:1AAA
Text on card19.31:1AAA
Primary button7.26:1AAA
Secondary button7.21:1AAA
Muted text6.97:1AA
Accent7.61:1AAA
Destructive3.46:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 304.293);
  --foreground: oklch(0.134 0.04 301.894);
  --muted: oklch(0.924 0.008 281.14);
  --muted-foreground: oklch(0.461 0.016 280.704);
  --popover: oklch(0.99 0.004 304.293);
  --popover-foreground: oklch(0.134 0.04 301.894);
  --card: oklch(0.99 0.004 304.293);
  --card-foreground: oklch(0.134 0.04 301.894);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.733 0.094 302.479);
  --primary-foreground: oklch(0.216 0.059 299.956);
  --secondary: oklch(0.724 0.083 279.193);
  --secondary-foreground: oklch(0.21 0.054 275.95);
  --accent: oklch(0.763 0.108 323.152);
  --accent-foreground: oklch(0.238 0.066 323.51);
  --destructive: oklch(0.548 0.21 30.466);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.733 0.094 302.479);
  --chart-1: oklch(0.733 0.094 302.479);
  --chart-2: oklch(0.724 0.083 279.193);
  --chart-3: oklch(0.763 0.108 323.152);
  --chart-4: oklch(0.756 0.073 279.555);
  --chart-5: oklch(0.729 0.1 302.342);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.08 0.017 305.356);
  --foreground: oklch(0.975 0.004 304.289);
  --muted: oklch(0.194 0.013 280.173);
  --muted-foreground: oklch(0.704 0.014 280.951);
  --popover: oklch(0.08 0.017 305.356);
  --popover-foreground: oklch(0.975 0.004 304.289);
  --card: oklch(0.08 0.017 305.356);
  --card-foreground: oklch(0.975 0.004 304.289);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.733 0.094 302.479);
  --primary-foreground: oklch(0.216 0.059 299.956);
  --secondary: oklch(0.724 0.083 279.193);
  --secondary-foreground: oklch(0.21 0.054 275.95);
  --accent: oklch(0.763 0.108 323.152);
  --accent-foreground: oklch(0.238 0.066 323.51);
  --destructive: oklch(0.656 0.203 29.795);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.733 0.094 302.479);
  --chart-1: oklch(0.733 0.094 302.479);
  --chart-2: oklch(0.724 0.083 279.193);
  --chart-3: oklch(0.763 0.108 323.152);
  --chart-4: oklch(0.756 0.073 279.555);
  --chart-5: oklch(0.729 0.1 302.342);
}