Formal is a shadcn/ui theme built around a deep green primary color (#18351b) with deep teal accents (#183529). The light mode uses a neutral background (#f8fcf8). Dark mode keeps the deep green primary (#18351b) on a neutral background (#010402).
| Token | Light | Dark |
|---|---|---|
| Background | #f8fcf8mintcream | #010402black |
| Foreground | #041006black | #ffffffwhite |
| Card | #f4fbf5whitesmoke | #030803black |
| Card foreground | #030c04black | #ffffffwhite |
| Popover | #f8fcf8mintcream | #010402black |
| Popover foreground | #041006black | #ffffffwhite |
| Primary | #18351bdarkgreen | #18351bdarkgreen |
| Primary foreground | #a7d7acsilver | #a7d7acsilver |
| Secondary | #233518darkslategray | #233518darkslategray |
| Secondary foreground | #bad7a7silver | #bad7a7silver |
| Muted | #dfe9d8gainsboro | #1d2716black |
| Muted foreground | #404c38darkslategray | #bbc7b3silver |
| Accent | #183529darkslategray | #183529darkslategray |
| Accent foreground | #a7d7c4lightsteelblue | #a7d7c4lightsteelblue |
| Destructive | #913d0dsaddlebrown | #ee7f3fcoral |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #18351bdarkgreen | #18351bdarkgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.74:1 | AAA |
| Text on card | 18.83:1 | AAA |
| Primary button | 8.31:1 | AAA |
| Secondary button | 8.40:1 | AAA |
| Muted text | 7.26:1 | AAA |
| Accent | 8.35:1 | AAA |
| Destructive | 7.25:1 | AAA |
| Text on background | 20.61:1 | AAA |
| Text on card | 20.23:1 | AAA |
| Primary button | 8.31:1 | AAA |
| Secondary button | 8.40:1 | AAA |
| Muted text | 8.80:1 | AAA |
| Accent | 8.35:1 | AAA |
| Destructive | 7.75:1 | AAA |
Paste this into your globals.css to use Formal in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.987 0.007 148.511);
--foreground: oklch(0.157 0.03 146.954);
--muted: oklch(0.921 0.025 132.567);
--muted-foreground: oklch(0.401 0.036 133.077);
--popover: oklch(0.987 0.007 148.511);
--popover-foreground: oklch(0.157 0.03 146.954);
--card: oklch(0.981 0.011 148.469);
--card-foreground: oklch(0.14 0.026 147.255);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.297 0.058 146.053);
--primary-foreground: oklch(0.835 0.079 147.479);
--secondary: oklch(0.304 0.054 134.015);
--secondary-foreground: oklch(0.847 0.072 133.043);
--accent: oklch(0.301 0.041 165.66);
--accent-foreground: oklch(0.841 0.057 168.505);
--destructive: oklch(0.468 0.127 44.953);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.297 0.058 146.053);
--chart-1: oklch(0.297 0.058 146.053);
--chart-2: oklch(0.304 0.054 134.015);
--chart-3: oklch(0.301 0.041 165.66);
--chart-4: oklch(0.342 0.063 134.099);
--chart-5: oklch(0.3 0.062 145.873);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.096 0.015 147.514);
--foreground: oklch(1 0 180);
--muted: oklch(0.258 0.034 133.481);
--muted-foreground: oklch(0.814 0.03 132.643);
--popover: oklch(0.096 0.015 147.514);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.121 0.019 147.514);
--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.297 0.058 146.053);
--primary-foreground: oklch(0.835 0.079 147.479);
--secondary: oklch(0.304 0.054 134.015);
--secondary-foreground: oklch(0.847 0.072 133.043);
--accent: oklch(0.301 0.041 165.66);
--accent-foreground: oklch(0.841 0.057 168.505);
--destructive: oklch(0.711 0.157 48.157);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.297 0.058 146.053);
--chart-1: oklch(0.297 0.058 146.053);
--chart-2: oklch(0.304 0.054 134.015);
--chart-3: oklch(0.301 0.041 165.66);
--chart-4: oklch(0.342 0.063 134.099);
--chart-5: oklch(0.3 0.062 145.873);
}