Required for shadcn/ui

Required is a shadcn/ui theme built around a purple primary color (#7f2281) with teal accents (#22817f). The light mode uses a neutral background (#fdf6fd). Dark mode keeps the purple primary (#7f2281) on a purple-tinted background (#0f050f).

Color palette

TokenLightDark
Background
#fdf6fdsnow
#0f050fblack
Foreground
#080208black
#f9f5f9whitesmoke
Card
#fdf6fdsnow
#0f050fblack
Card foreground
#080208black
#f9f5f9whitesmoke
Popover
#fdf6fdsnow
#0f050fblack
Popover foreground
#080208black
#f9f5f9whitesmoke
Primary
#7f2281purple
#7f2281purple
Primary foreground
#f6dff6lavender
#f6dff6lavender
Secondary
#817f22olivedrab
#817f22olivedrab
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f0f0e0beige
#1f1f0fblack
Muted foreground
#434342darkslategray
#bdbdbcsilver
Accent
#22817fteal
#22817fteal
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#981c0bdarkred
#ed2b12orangered
Destructive foreground
#fcddd9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7f2281purple
#7f2281purple

Contrast

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

Light mode
Text on background19.41:1AAA
Text on card19.41:1AAA
Primary button6.84:1AA
Secondary button4.19:1AA Large
Muted text8.59:1AAA
Accent4.65:1AA
Destructive6.59:1AA
Dark mode
Text on background18.52:1AAA
Text on card18.52:1AAA
Primary button6.84:1AA
Secondary button4.19:1AA Large
Muted text8.87:1AAA
Accent4.65:1AA
Destructive4.22:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.011 325.181);
  --foreground: oklch(0.109 0.024 326.611);
  --muted: oklch(0.951 0.021 106.002);
  --muted-foreground: oklch(0.382 0.002 105.718);
  --popover: oklch(0.982 0.011 325.181);
  --popover-foreground: oklch(0.109 0.024 326.611);
  --card: oklch(0.982 0.011 325.181);
  --card-foreground: oklch(0.109 0.024 326.611);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.44 0.168 327.265);
  --primary-foreground: oklch(0.929 0.04 325.396);
  --secondary: oklch(0.581 0.112 108.449);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.55 0.084 193.318);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.441 0.161 31.015);
  --destructive-foreground: oklch(0.922 0.035 26.737);
  --ring: oklch(0.44 0.168 327.265);
  --chart-1: oklch(0.44 0.168 327.265);
  --chart-2: oklch(0.581 0.112 108.449);
  --chart-3: oklch(0.55 0.084 193.318);
  --chart-4: oklch(0.62 0.12 108.457);
  --chart-5: oklch(0.443 0.174 327.308);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.028 326.429);
  --foreground: oklch(0.975 0.006 325.146);
  --muted: oklch(0.233 0.028 107.533);
  --muted-foreground: oklch(0.799 0.002 105.657);
  --popover: oklch(0.139 0.028 326.429);
  --popover-foreground: oklch(0.975 0.006 325.146);
  --card: oklch(0.139 0.028 326.429);
  --card-foreground: oklch(0.975 0.006 325.146);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.44 0.168 327.265);
  --primary-foreground: oklch(0.929 0.04 325.396);
  --secondary: oklch(0.581 0.112 108.449);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.55 0.084 193.318);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.61 0.229 30.929);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.44 0.168 327.265);
  --chart-1: oklch(0.44 0.168 327.265);
  --chart-2: oklch(0.581 0.112 108.449);
  --chart-3: oklch(0.55 0.084 193.318);
  --chart-4: oklch(0.62 0.12 108.457);
  --chart-5: oklch(0.443 0.174 327.308);
}