Legislation for shadcn/ui

Legislation is a shadcn/ui theme built around a muted light blue primary color (#d5dce2) with muted light indigo accents (#d5d6e2). The light mode uses a neutral background (#fbfdfe). Dark mode keeps the muted light blue primary (#d5dce2) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfdfewhite
#000000black
Foreground
#010304black
#fbfdfdwhite
Card
#f6fafdghostwhite
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#fbfdfewhite
#000000black
Popover foreground
#010304black
#fbfdfdwhite
Primary
#d5dce2gainsboro
#d5dce2gainsboro
Primary foreground
#36434edarkslategray
#36434edarkslategray
Secondary
#d5e2e1gainsboro
#d5e2e1gainsboro
Secondary foreground
#364e4ddarkslategray
#364e4ddarkslategray
Muted
#e9ececlavender
#131616black
Muted foreground
#435151darkslategray
#aebcbcsilver
Accent
#d5d6e2gainsboro
#d5d6e2gainsboro
Accent foreground
#36384edarkslategray
#36384edarkslategray
Destructive
#7d2503maroon
#fa5514orangered
Destructive foreground
#fdc9b4peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d5dce2gainsboro
#d5dce2gainsboro

Contrast

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

Light mode
Text on background20.20:1AAA
Text on card20.06:1AAA
Primary button7.32:1AAA
Secondary button6.69:1AA
Muted text6.99:1AA
Accent7.90:1AAA
Destructive6.63:1AA
Dark mode
Text on background20.57:1AAA
Text on card20.67:1AAA
Primary button7.32:1AAA
Secondary button6.69:1AA
Muted text9.28:1AAA
Accent7.90:1AAA
Destructive3.28:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.003 242.232);
  --foreground: oklch(0.09 0.009 235.304);
  --muted: oklch(0.942 0.004 193.524);
  --muted-foreground: oklch(0.423 0.019 192.739);
  --popover: oklch(0.992 0.003 242.232);
  --popover-foreground: oklch(0.09 0.009 235.304);
  --card: oklch(0.984 0.006 242.271);
  --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.891 0.011 242.357);
  --primary-foreground: oklch(0.377 0.025 243.118);
  --secondary: oklch(0.902 0.014 193.305);
  --secondary-foreground: oklch(0.405 0.029 192.17);
  --accent: oklch(0.878 0.017 283.637);
  --accent-foreground: oklch(0.348 0.039 281.795);
  --destructive: oklch(0.399 0.128 38.186);
  --destructive-foreground: oklch(0.876 0.067 42.626);
  --ring: oklch(0.891 0.011 242.357);
  --chart-1: oklch(0.891 0.011 242.357);
  --chart-2: oklch(0.902 0.014 193.305);
  --chart-3: oklch(0.878 0.017 283.637);
  --chart-4: oklch(0.923 0.011 193.376);
  --chart-5: oklch(0.89 0.013 242.385);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.002 242.216);
  --muted: oklch(0.197 0.006 193.038);
  --muted-foreground: oklch(0.785 0.016 193.196);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.002 242.216);
  --card: oklch(0.092 0 180);
  --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.891 0.011 242.357);
  --primary-foreground: oklch(0.377 0.025 243.118);
  --secondary: oklch(0.902 0.014 193.305);
  --secondary-foreground: oklch(0.405 0.029 192.17);
  --accent: oklch(0.878 0.017 283.637);
  --accent-foreground: oklch(0.348 0.039 281.795);
  --destructive: oklch(0.669 0.211 38.035);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.891 0.011 242.357);
  --chart-1: oklch(0.891 0.011 242.357);
  --chart-2: oklch(0.902 0.014 193.305);
  --chart-3: oklch(0.878 0.017 283.637);
  --chart-4: oklch(0.923 0.011 193.376);
  --chart-5: oklch(0.89 0.013 242.385);
}