Required for shadcn/ui

Required is a shadcn/ui theme built around a muted purple primary color (#c6b3c1) with neutral gray accents (#d5d3d4). The light mode uses a neutral background (#fefbfd). Dark mode keeps the muted purple primary (#c6b3c1) on a purple-tinted background (#0e060c).

Color palette

TokenLightDark
Background
#fefbfdsnow
#0e060cblack
Foreground
#140610black
#fdfcfdwhite
Card
#fcf8fbsnow
#12080fblack
Card foreground
#10050dblack
#ffffffwhite
Popover
#fcf8fbsnow
#12080fblack
Popover foreground
#10050dblack
#ffffffwhite
Primary
#c6b3c1silver
#c6b3c1silver
Primary foreground
#291f26darkslategray
#291f26darkslategray
Secondary
#d5d3d4lightgrey
#2b2129darkslategray
Secondary foreground
#3c393bdarkslategray
#c8b7c3silver
Muted
#e6d5e2gainsboro
#2a1925black
Muted foreground
#4e464cdarkslategray
#b9b1b7silver
Accent
#d5d3d4lightgrey
#2b2129darkslategray
Accent foreground
#3c393bdarkslategray
#c8b7c3silver
Destructive
#81130emaroon
#eb4a42tomato
Destructive foreground
#f9cac8pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c6b3c1silver
#c6b3c1silver

Contrast

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

Light mode
Text on background19.23:1AAA
Text on card18.97:1AAA
Primary button8.08:1AAA
Secondary button7.64:1AAA
Muted text6.51:1AA
Accent7.64:1AAA
Destructive7.01:1AAA
Dark mode
Text on background19.51:1AAA
Text on card19.70:1AAA
Primary button8.08:1AAA
Secondary button8.12:1AAA
Muted text7.96:1AAA
Accent8.12:1AAA
Destructive3.74: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.991 0.003 333.934);
  --foreground: oklch(0.15 0.032 336.708);
  --muted: oklch(0.891 0.026 334.353);
  --muted-foreground: oklch(0.404 0.013 334.424);
  --popover: oklch(0.982 0.007 333.991);
  --popover-foreground: oklch(0.137 0.028 335.977);
  --card: oklch(0.982 0.007 333.991);
  --card-foreground: oklch(0.137 0.028 335.977);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.788 0.028 334.473);
  --primary-foreground: oklch(0.253 0.02 335.173);
  --secondary: oklch(0.868 0.003 333.928);
  --secondary-foreground: oklch(0.349 0.004 334.088);
  --accent: oklch(0.868 0.003 333.928);
  --accent-foreground: oklch(0.349 0.004 334.088);
  --destructive: oklch(0.39 0.145 28.97);
  --destructive-foreground: oklch(0.88 0.054 21.749);
  --ring: oklch(0.788 0.028 334.473);
  --chart-1: oklch(0.788 0.028 334.473);
  --chart-2: oklch(0.868 0.003 333.928);
  --chart-3: oklch(0.868 0.003 333.928);
  --chart-4: oklch(0.892 0.002 333.917);
  --chart-5: oklch(0.786 0.035 334.599);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.02 335.462);
  --foreground: oklch(0.992 0.002 333.909);
  --muted: oklch(0.24 0.035 336.192);
  --muted-foreground: oklch(0.769 0.011 334.125);
  --popover: oklch(0.152 0.023 336.099);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.152 0.023 336.099);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.788 0.028 334.473);
  --primary-foreground: oklch(0.253 0.02 335.173);
  --secondary: oklch(0.264 0.02 335.104);
  --secondary-foreground: oklch(0.797 0.025 334.403);
  --accent: oklch(0.264 0.02 335.104);
  --accent-foreground: oklch(0.797 0.025 334.403);
  --destructive: oklch(0.636 0.199 27.322);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.788 0.028 334.473);
  --chart-1: oklch(0.788 0.028 334.473);
  --chart-2: oklch(0.264 0.02 335.104);
  --chart-3: oklch(0.264 0.02 335.104);
  --chart-4: oklch(0.294 0.023 335.161);
  --chart-5: oklch(0.786 0.035 334.599);
}