Legal for shadcn/ui

Legal is a shadcn/ui theme built around a light purple primary color (#fbf3fb) with muted light purple accents (#decadd). The light mode uses a neutral background (#ffffff). Dark mode keeps the light purple primary (#fbf3fb) on a neutral background (#040104).

Color palette

TokenLightDark
Background
#ffffffwhite
#040104black
Foreground
#110311black
#f9f6f9whitesmoke
Card
#fcfcfcsnow
#070307black
Card foreground
#0d020dblack
#fbf9fbsnow
Popover
#ffffffwhite
#040104black
Popover foreground
#110311black
#f9f6f9whitesmoke
Primary
#fbf3fbghostwhite
#fbf3fbghostwhite
Primary foreground
#8f2d8crebeccapurple
#8f2d8crebeccapurple
Secondary
#ece4eclavender
#221c21black
Secondary foreground
#5c425cdimgray
#bfb0besilver
Muted
#e7dfe7gainsboro
#201820black
Muted foreground
#636363dimgray
#9c9c9cdarkgray
Accent
#decaddthistle
#362635darkslategray
Accent foreground
#482d47darkslategray
#d0bdd0thistle
Destructive
#c21b0ffirebrick
#da1e10firebrick
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fbf3fbghostwhite
#fbf3fbghostwhite

Contrast

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

Light mode
Text on background20.09:1AAA
Text on card19.91:1AAA
Primary button6.62:1AA
Secondary button7.06:1AAA
Muted text4.60:1AA
Accent7.78:1AAA
Destructive6.05:1AA
Dark mode
Text on background19.33:1AAA
Text on card19.55:1AAA
Primary button6.62:1AA
Secondary button8.12:1AAA
Muted text6.30:1AA
Accent7.99:1AAA
Destructive5.02:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.137 0.041 328.627);
  --muted: oklch(0.912 0.013 326.666);
  --muted-foreground: oklch(0.501 0 180);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.137 0.041 328.627);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.123 0.035 328.451);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.974 0.013 326.658);
  --primary-foreground: oklch(0.482 0.173 329.247);
  --secondary: oklch(0.928 0.013 326.662);
  --secondary-foreground: oklch(0.417 0.055 327.605);
  --accent: oklch(0.86 0.034 326.878);
  --accent-foreground: oklch(0.341 0.057 327.883);
  --destructive: oklch(0.522 0.201 29.711);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.974 0.013 326.658);
  --chart-1: oklch(0.974 0.013 326.658);
  --chart-2: oklch(0.928 0.013 326.662);
  --chart-3: oklch(0.86 0.034 326.878);
  --chart-4: oklch(0.952 0.009 326.62);
  --chart-5: oklch(0.973 0.014 326.664);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.087 0.016 327.721);
  --foreground: oklch(0.976 0.005 326.586);
  --muted: oklch(0.222 0.019 327.243);
  --muted-foreground: oklch(0.691 0 180);
  --popover: oklch(0.087 0.016 327.721);
  --popover-foreground: oklch(0.976 0.005 326.586);
  --card: oklch(0.11 0.02 327.721);
  --card-foreground: oklch(0.984 0.003 326.571);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.974 0.013 326.658);
  --primary-foreground: oklch(0.482 0.173 329.247);
  --secondary: oklch(0.234 0.014 327.06);
  --secondary-foreground: oklch(0.775 0.025 326.817);
  --accent: oklch(0.294 0.035 327.507);
  --accent-foreground: oklch(0.821 0.033 326.882);
  --destructive: oklch(0.568 0.22 29.727);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.974 0.013 326.658);
  --chart-1: oklch(0.974 0.013 326.658);
  --chart-2: oklch(0.234 0.014 327.06);
  --chart-3: oklch(0.294 0.035 327.507);
  --chart-4: oklch(0.265 0.018 327.095);
  --chart-5: oklch(0.973 0.014 326.664);
}