Lawful for shadcn/ui

Lawful is a shadcn/ui theme built around a green primary color (#64971c) with muted light green accents (#d2d5cd). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#64971c) on a green-tinted background (#080a05).

Color palette

TokenLightDark
Background
#ffffffwhite
#080a05black
Foreground
#060802black
#ffffffwhite
Card
#fcfcfcsnow
#0b0e07black
Card foreground
#030401black
#ffffffwhite
Popover
#ffffffwhite
#080a05black
Popover foreground
#060802black
#ffffffwhite
Primary
#64971colivedrab
#64971colivedrab
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d2d5cdlightgrey
#2f3725darkslategray
Secondary foreground
#393d34darkslategray
#c9d2bcsilver
Muted
#dce2d4gainsboro
#252b1ddarkslategray
Muted foreground
#43463edarkslategray
#bdc1b9silver
Accent
#d2d5cdlightgrey
#2f3725darkslategray
Accent foreground
#393d34darkslategray
#c9d2bcsilver
Destructive
#c51502firebrick
#fd2912orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#64971colivedrab
#64971colivedrab

Contrast

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

Light mode
Text on background20.12:1AAA
Text on card20.11:1AAA
Primary button3.51:1AA Large
Secondary button7.46:1AAA
Muted text7.29:1AAA
Accent7.46:1AAA
Destructive6.02:1AA
Dark mode
Text on background19.86:1AAA
Text on card19.48:1AAA
Primary button3.51:1AA Large
Secondary button7.95:1AAA
Muted text7.98:1AAA
Accent7.95:1AAA
Destructive3.82:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.129 0.022 124.172);
  --muted: oklch(0.906 0.02 125.355);
  --muted-foreground: oklch(0.389 0.014 125.543);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.129 0.022 124.172);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.102 0.017 124.172);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.617 0.156 130.55);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.868 0.01 125.213);
  --secondary-foreground: oklch(0.352 0.016 125.685);
  --accent: oklch(0.868 0.01 125.213);
  --accent-foreground: oklch(0.352 0.016 125.685);
  --destructive: oklch(0.523 0.206 30.44);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.617 0.156 130.55);
  --chart-1: oklch(0.617 0.156 130.55);
  --chart-2: oklch(0.868 0.01 125.213);
  --chart-3: oklch(0.868 0.01 125.213);
  --chart-4: oklch(0.89 0.009 125.181);
  --chart-5: oklch(0.624 0.161 130.787);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.014 124.544);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.278 0.027 126.439);
  --muted-foreground: oklch(0.805 0.012 125.245);
  --popover: oklch(0.141 0.014 124.544);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.156 0.016 125.656);
  --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.617 0.156 130.55);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.323 0.031 126.457);
  --secondary-foreground: oklch(0.85 0.031 125.548);
  --accent: oklch(0.323 0.031 126.457);
  --accent-foreground: oklch(0.85 0.031 125.548);
  --destructive: oklch(0.637 0.243 30.469);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.617 0.156 130.55);
  --chart-1: oklch(0.617 0.156 130.55);
  --chart-2: oklch(0.323 0.031 126.457);
  --chart-3: oklch(0.323 0.031 126.457);
  --chart-4: oklch(0.356 0.036 126.504);
  --chart-5: oklch(0.624 0.161 130.787);
}