Flat is a shadcn/ui theme built around a pink primary color (#87225b) with green accents (#22874d). The light mode uses a neutral background (#fefbfd). Dark mode keeps the pink primary (#87225b) on a pink-tinted background (#0e060b).
| Token | Light | Dark |
|---|---|---|
| Background | #fefbfdsnow | #0e060bblack |
| Foreground | #040103black | #fdfcfdwhite |
| Card | #fefbfdsnow | #0e060bblack |
| Card foreground | #040103black | #fdfcfdwhite |
| Popover | #fefbfdsnow | #0e060bblack |
| Popover foreground | #040103black | #fdfcfdwhite |
| Primary | #87225bpurple | #87225bpurple |
| Primary foreground | #f8e2efmistyrose | #f8e2efmistyrose |
| Secondary | #22874dseagreen | #22874dseagreen |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #e4e7e5gainsboro | #181b19black |
| Muted foreground | #515c56dimgray | #a3aea8darkgray |
| Accent | #22874dseagreen | #22874dseagreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #93340bsaddlebrown | #f0723dtomato |
| Destructive foreground | #fce0d4antiquewhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #87225bpurple | #87225bpurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.19:1 | AAA |
| Text on card | 20.19:1 | AAA |
| Primary button | 7.13:1 | AAA |
| Secondary button | 4.54:1 | AA |
| Muted text | 5.58:1 | AA |
| Accent | 4.54:1 | AA |
| Destructive | 6.12:1 | AA |
| Text on background | 19.52:1 | AAA |
| Text on card | 19.52:1 | AAA |
| Primary button | 7.13:1 | AAA |
| Secondary button | 4.54:1 | AA |
| Muted text | 7.59:1 | AAA |
| Accent | 4.54:1 | AA |
| Destructive | 7.21:1 | AAA |
Paste this into your globals.css to use Flat in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.004 341.903);
--foreground: oklch(0.085 0.017 341.831);
--muted: oklch(0.925 0.003 161.721);
--muted-foreground: oklch(0.463 0.016 160.946);
--popover: oklch(0.991 0.004 341.903);
--popover-foreground: oklch(0.085 0.017 341.831);
--card: oklch(0.991 0.004 341.903);
--card-foreground: oklch(0.085 0.017 341.831);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.432 0.147 350.316);
--primary-foreground: oklch(0.935 0.028 342.516);
--secondary: oklch(0.551 0.127 153.463);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.551 0.127 153.463);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.457 0.137 39.731);
--destructive-foreground: oklch(0.927 0.035 44.641);
--ring: oklch(0.432 0.147 350.316);
--chart-1: oklch(0.432 0.147 350.316);
--chart-2: oklch(0.551 0.127 153.463);
--chart-3: oklch(0.551 0.127 153.463);
--chart-4: oklch(0.587 0.136 153.372);
--chart-5: oklch(0.434 0.152 350.763);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.139 0.018 343.357);
--foreground: oklch(0.992 0.001 341.835);
--muted: oklch(0.218 0.005 161.27);
--muted-foreground: oklch(0.739 0.014 161.332);
--popover: oklch(0.139 0.018 343.357);
--popover-foreground: oklch(0.992 0.001 341.835);
--card: oklch(0.139 0.018 343.357);
--card-foreground: oklch(0.992 0.001 341.835);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.432 0.147 350.316);
--primary-foreground: oklch(0.935 0.028 342.516);
--secondary: oklch(0.551 0.127 153.463);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.551 0.127 153.463);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.694 0.169 42.221);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.432 0.147 350.316);
--chart-1: oklch(0.432 0.147 350.316);
--chart-2: oklch(0.551 0.127 153.463);
--chart-3: oklch(0.551 0.127 153.463);
--chart-4: oklch(0.587 0.136 153.372);
--chart-5: oklch(0.434 0.152 350.763);
}