Legal for shadcn/ui

Legal is a shadcn/ui theme built around a vivid light indigo primary color (#e3e3fc) with vivid light green accents (#e3fce3). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the vivid light indigo primary (#e3e3fc) on a neutral background (#020208).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#020208black
Foreground
#020208black
#f5f5fawhitesmoke
Card
#f8f8fcghostwhite
#03030cblack
Card foreground
#010104black
#f8f8fcghostwhite
Popover
#f8f8fcghostwhite
#03030cblack
Popover foreground
#010104black
#f8f8fcghostwhite
Primary
#e3e3fclavender
#e3e3fclavender
Primary foreground
#2b2be9blue
#2b2be9blue
Secondary
#fce3e3mistyrose
#fce3e3mistyrose
Secondary foreground
#9d1010darkred
#9d1010darkred
Muted
#f5ebeblinen
#140a0ablack
Muted foreground
#6a4e4edimgray
#b19595rosybrown
Accent
#e3fce3honeydew
#e3fce3honeydew
Accent foreground
#074107darkgreen
#074107darkgreen
Destructive
#b53308firebrick
#dc3e09orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e3e3fclavender
#e3e3fclavender

Contrast

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

Light mode
Text on background20.08:1AAA
Text on card19.63:1AAA
Primary button6.36:1AA
Secondary button6.86:1AA
Muted text6.37:1AA
Accent10.92:1AAA
Destructive6.09:1AA
Dark mode
Text on background19.03:1AAA
Text on card19.38:1AAA
Primary button6.36:1AA
Secondary button6.86:1AA
Muted text7.03:1AAA
Accent10.92:1AAA
Destructive4.42:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 286.347);
  --foreground: oklch(0.094 0.022 281.385);
  --muted: oklch(0.947 0.011 17.344);
  --muted-foreground: oklch(0.453 0.037 18.629);
  --popover: oklch(0.979 0.006 286.292);
  --popover-foreground: oklch(0.075 0.017 281.385);
  --card: oklch(0.979 0.006 286.292);
  --card-foreground: oklch(0.075 0.017 281.385);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.924 0.033 285.726);
  --primary-foreground: oklch(0.46 0.267 269.341);
  --secondary: oklch(0.937 0.027 17.649);
  --secondary-foreground: oklch(0.444 0.172 28.037);
  --accent: oklch(0.967 0.042 145.243);
  --accent-foreground: oklch(0.326 0.103 142.756);
  --destructive: oklch(0.516 0.173 35.803);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.924 0.033 285.726);
  --chart-1: oklch(0.924 0.033 285.726);
  --chart-2: oklch(0.937 0.027 17.649);
  --chart-3: oklch(0.967 0.042 145.243);
  --chart-4: oklch(0.968 0.013 17.388);
  --chart-5: oklch(0.923 0.035 285.699);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.093 0.023 280.915);
  --foreground: oklch(0.971 0.007 286.263);
  --muted: oklch(0.161 0.017 19.143);
  --muted-foreground: oklch(0.696 0.033 17.973);
  --popover: oklch(0.106 0.027 280.854);
  --popover-foreground: oklch(0.98 0.005 286.31);
  --card: oklch(0.106 0.027 280.854);
  --card-foreground: oklch(0.98 0.005 286.31);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.924 0.033 285.726);
  --primary-foreground: oklch(0.46 0.267 269.341);
  --secondary: oklch(0.937 0.027 17.649);
  --secondary-foreground: oklch(0.444 0.172 28.037);
  --accent: oklch(0.967 0.042 145.243);
  --accent-foreground: oklch(0.326 0.103 142.756);
  --destructive: oklch(0.595 0.202 35.519);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.924 0.033 285.726);
  --chart-1: oklch(0.924 0.033 285.726);
  --chart-2: oklch(0.937 0.027 17.649);
  --chart-3: oklch(0.967 0.042 145.243);
  --chart-4: oklch(0.968 0.013 17.388);
  --chart-5: oklch(0.923 0.035 285.699);
}