Croup for shadcn/ui

Croup is a shadcn/ui theme built around a muted violet primary color (#725c9d) with muted light violet accents (#d4d0dd). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted violet primary (#725c9d) on a neutral background (#020204).

Color palette

TokenLightDark
Background
#ffffffwhite
#020204black
Foreground
#000000black
#fcfcfdwhite
Card
#ffffffwhite
#020204black
Card foreground
#000000black
#fcfcfdwhite
Popover
#ffffffwhite
#020204black
Popover foreground
#000000black
#fcfcfdwhite
Primary
#725c9dslategray
#725c9dslategray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e8e6ealavender
#262527darkslategray
Secondary foreground
#4d4a55darkslategray
#bfbdc1silver
Muted
#e6e1eflavender
#15101eblack
Muted foreground
#625e68dimgray
#9a97a1darkgray
Accent
#d4d0ddlightgrey
#393540darkslategray
Accent foreground
#3a3347darkslategray
#d2d0d8lightgrey
Destructive
#971e02darkred
#fc461dorangered
Destructive foreground
#fed6cdbisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#725c9dslategray
#725c9dslategray

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button5.59:1AA
Secondary button6.99:1AA
Muted text4.94:1AA
Accent7.92:1AAA
Destructive6.30:1AA
Dark mode
Text on background20.25:1AAA
Text on card20.25:1AAA
Primary button5.59:1AA
Secondary button8.17:1AAA
Muted text6.49:1AA
Accent7.80:1AAA
Destructive3.49:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.918 0.018 301.169);
  --muted-foreground: oklch(0.49 0.016 300.962);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.526 0.102 298.172);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.928 0.004 301.416);
  --secondary-foreground: oklch(0.415 0.019 300.764);
  --accent: oklch(0.864 0.018 301.15);
  --accent-foreground: oklch(0.338 0.035 299.806);
  --destructive: oklch(0.44 0.16 33.034);
  --destructive-foreground: oklch(0.907 0.047 32.767);
  --ring: oklch(0.526 0.102 298.172);
  --chart-1: oklch(0.526 0.102 298.172);
  --chart-2: oklch(0.928 0.004 301.416);
  --chart-3: oklch(0.864 0.018 301.15);
  --chart-4: oklch(0.952 0.003 301.443);
  --chart-5: oklch(0.519 0.113 297.693);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.083 0.012 301.844);
  --foreground: oklch(0.992 0.001 301.482);
  --muted: oklch(0.187 0.027 299.058);
  --muted-foreground: oklch(0.681 0.015 301.141);
  --popover: oklch(0.083 0.012 301.844);
  --popover-foreground: oklch(0.992 0.001 301.482);
  --card: oklch(0.083 0.012 301.844);
  --card-foreground: oklch(0.992 0.001 301.482);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.526 0.102 298.172);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.267 0.004 301.231);
  --secondary-foreground: oklch(0.802 0.005 301.383);
  --accent: oklch(0.338 0.019 300.594);
  --accent-foreground: oklch(0.861 0.011 301.287);
  --destructive: oklch(0.656 0.224 33.529);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.526 0.102 298.172);
  --chart-1: oklch(0.526 0.102 298.172);
  --chart-2: oklch(0.267 0.004 301.231);
  --chart-3: oklch(0.338 0.019 300.594);
  --chart-4: oklch(0.297 0.005 301.218);
  --chart-5: oklch(0.519 0.113 297.693);
}