Lawful is a shadcn/ui theme built around a violet primary color (#ba85e0) with teal accents (#85e0ba). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#ba85e0) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #08040cblack | #faf9fbghostwhite |
| Card | #fcfcfcsnow | #030303black |
| Card foreground | #060208black | #fdfcfdwhite |
| Popover | #fcfcfcsnow | #030303black |
| Popover foreground | #060208black | #fdfcfdwhite |
| Primary | #ba85e0orchid | #ba85e0orchid |
| Primary foreground | #1c0a29black | #1c0a29black |
| Secondary | #e0ba85burlywood | #e0ba85burlywood |
| Secondary foreground | #291c0ablack | #291c0ablack |
| Muted | #e2dcd5gainsboro | #2a251dblack |
| Muted foreground | #6e6559dimgray | #a69d91rosybrown |
| Accent | #85e0bamediumaquamarine | #85e0bamediumaquamarine |
| Accent foreground | #0a291cblack | #0a291cblack |
| Destructive | #9e2c10brown | #e84117orangered |
| Destructive foreground | #fce8e3mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #ba85e0orchid | #ba85e0orchid |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.32:1 | AAA |
| Text on card | 20.14:1 | AAA |
| Primary button | 6.67:1 | AA |
| Secondary button | 9.13:1 | AAA |
| Muted text | 4.21:1 | AA Large |
| Accent | 9.95:1 | AAA |
| Destructive | 6.31:1 | AA |
| Text on background | 20.00:1 | AAA |
| Text on card | 20.20:1 | AAA |
| Primary button | 6.67:1 | AA |
| Secondary button | 9.13:1 | AAA |
| Muted text | 5.68:1 | AA |
| Accent | 9.95:1 | AAA |
| Destructive | 4.04:1 | AA Large |
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.119 0.025 313.227);
--muted: oklch(0.898 0.012 76.585);
--muted-foreground: oklch(0.512 0.023 76.363);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.104 0.022 313.466);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.104 0.022 313.466);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.703 0.141 310.021);
--primary-foreground: oklch(0.192 0.062 308.577);
--secondary: oklch(0.811 0.082 75.503);
--secondary-foreground: oklch(0.238 0.036 73.867);
--accent: oklch(0.84 0.104 165.404);
--accent-foreground: oklch(0.253 0.044 162.796);
--destructive: oklch(0.467 0.154 34.396);
--destructive-foreground: oklch(0.946 0.023 34.298);
--ring: oklch(0.703 0.141 310.021);
--chart-1: oklch(0.703 0.141 310.021);
--chart-2: oklch(0.811 0.082 75.503);
--chart-3: oklch(0.84 0.104 165.404);
--chart-4: oklch(0.829 0.074 75.751);
--chart-5: oklch(0.701 0.148 309.919);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.984 0.002 311.706);
--muted: oklch(0.267 0.016 76.18);
--muted-foreground: oklch(0.701 0.021 76.48);
--popover: oklch(0.092 0 180);
--popover-foreground: oklch(0.992 0.001 311.715);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.992 0.001 311.715);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.703 0.141 310.021);
--primary-foreground: oklch(0.192 0.062 308.577);
--secondary: oklch(0.811 0.082 75.503);
--secondary-foreground: oklch(0.238 0.036 73.867);
--accent: oklch(0.84 0.104 165.404);
--accent-foreground: oklch(0.253 0.044 162.796);
--destructive: oklch(0.618 0.21 34.131);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.703 0.141 310.021);
--chart-1: oklch(0.703 0.141 310.021);
--chart-2: oklch(0.811 0.082 75.503);
--chart-3: oklch(0.84 0.104 165.404);
--chart-4: oklch(0.829 0.074 75.751);
--chart-5: oklch(0.701 0.148 309.919);
}