Allocation for shadcn/ui

Allocation is a shadcn/ui theme built around a light purple primary color (#f7d4f0) with light green accents (#d4f7db). The light mode uses a neutral background (#fdf7fc). Dark mode keeps the light purple primary (#f7d4f0) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdf7fcsnow
#000000black
Foreground
#040103black
#fdfcfdwhite
Card
#fdf7fcsnow
#000000black
Card foreground
#040103black
#fdfcfdwhite
Popover
#fdf7fcsnow
#000000black
Popover foreground
#040103black
#fdfcfdwhite
Primary
#f7d4f0mistyrose
#f7d4f0mistyrose
Primary foreground
#80196dpurple
#80196dpurple
Secondary
#d4f7dbgainsboro
#d4f7dbgainsboro
Secondary foreground
#082b0fblack
#082b0fblack
Muted
#dbebdegainsboro
#142417black
Muted foreground
#535f55dimgray
#a0aca2darkgray
Accent
#d4f7dbgainsboro
#d4f7dbgainsboro
Accent foreground
#082b0fblack
#082b0fblack
Destructive
#b13b10firebrick
#ea521achocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f7d4f0mistyrose
#f7d4f0mistyrose

Contrast

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

Light mode
Text on background19.64:1AAA
Text on card19.64:1AAA
Primary button6.87:1AA
Secondary button13.27:1AAA
Muted text5.39:1AA
Accent13.27:1AAA
Destructive5.96:1AA
Dark mode
Text on background20.51:1AAA
Text on card20.51:1AAA
Primary button6.87:1AA
Secondary button13.27:1AAA
Muted text6.89:1AA
Accent13.27:1AAA
Destructive3.68:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.01 331.545);
  --foreground: oklch(0.086 0.016 332.273);
  --muted: oklch(0.924 0.024 151.031);
  --muted-foreground: oklch(0.473 0.022 150.708);
  --popover: oklch(0.982 0.01 331.545);
  --popover-foreground: oklch(0.086 0.016 332.273);
  --card: oklch(0.982 0.01 331.545);
  --card-foreground: oklch(0.086 0.016 332.273);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.908 0.053 332.205);
  --primary-foreground: oklch(0.421 0.163 336.88);
  --secondary: oklch(0.943 0.052 150.596);
  --secondary-foreground: oklch(0.255 0.064 146.727);
  --accent: oklch(0.943 0.052 150.596);
  --accent-foreground: oklch(0.255 0.064 146.727);
  --destructive: oklch(0.519 0.161 37.735);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.908 0.053 332.205);
  --chart-1: oklch(0.908 0.053 332.205);
  --chart-2: oklch(0.943 0.052 150.596);
  --chart-3: oklch(0.943 0.052 150.596);
  --chart-4: oklch(0.96 0.036 150.857);
  --chart-5: oklch(0.907 0.055 332.24);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.002 331.432);
  --muted: oklch(0.241 0.032 149.255);
  --muted-foreground: oklch(0.732 0.02 151.006);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.002 331.432);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.992 0.002 331.432);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.908 0.053 332.205);
  --primary-foreground: oklch(0.421 0.163 336.88);
  --secondary: oklch(0.943 0.052 150.596);
  --secondary-foreground: oklch(0.255 0.064 146.727);
  --accent: oklch(0.943 0.052 150.596);
  --accent-foreground: oklch(0.255 0.064 146.727);
  --destructive: oklch(0.639 0.198 37.805);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.908 0.053 332.205);
  --chart-1: oklch(0.908 0.053 332.205);
  --chart-2: oklch(0.943 0.052 150.596);
  --chart-3: oklch(0.943 0.052 150.596);
  --chart-4: oklch(0.96 0.036 150.857);
  --chart-5: oklch(0.907 0.055 332.24);
}