Flawless is a shadcn/ui theme built around a deep green primary color (#4f5427) with deep purple accents (#54274f). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#4f5427) on a neutral background (#070703).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #070703black |
| Foreground | #0f1104black | #ffffffwhite |
| Card | #fcfcfcsnow | #0a0a05black |
| Card foreground | #0c0c03black | #ffffffwhite |
| Popover | #ffffffwhite | #070703black |
| Popover foreground | #0f1104black | #ffffffwhite |
| Primary | #4f5427darkolivegreen | #4f5427darkolivegreen |
| Primary foreground | #e2e5c7gainsboro | #e2e5c7gainsboro |
| Secondary | #274f54darkslategray | #274f54darkslategray |
| Secondary foreground | #c7e2e5powderblue | #c7e2e5powderblue |
| Muted | #e7f2f4lavender | #0b1718black |
| Muted foreground | #51696cdimgray | #93abaedarkgray |
| Accent | #54274fdarkslategray | #54274fdarkslategray |
| Accent foreground | #e5c7e2thistle | #e5c7e2thistle |
| Destructive | #993000saddlebrown | #ff661ftomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4f5427darkolivegreen | #4f5427darkolivegreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.05:1 | AAA |
| Text on card | 19.21:1 | AAA |
| Primary button | 6.19:1 | AA |
| Secondary button | 6.59:1 | AA |
| Muted text | 5.14:1 | AA |
| Accent | 7.66:1 | AAA |
| Destructive | 7.54:1 | AAA |
| Text on background | 20.18:1 | AAA |
| Text on card | 19.80:1 | AAA |
| Primary button | 6.19:1 | AA |
| Secondary button | 6.59:1 | AA |
| Muted text | 7.53:1 | AAA |
| Accent | 7.66:1 | AAA |
| Destructive | 7.15:1 | AAA |
Paste this into your globals.css to use Flawless in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.17 0.027 113.399);
--muted: oklch(0.954 0.013 204.892);
--muted-foreground: oklch(0.502 0.029 204.696);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.17 0.027 113.399);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.151 0.023 112.853);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.43 0.066 113.922);
--primary-foreground: oklch(0.913 0.04 111.829);
--secondary: oklch(0.401 0.046 204.941);
--secondary-foreground: oklch(0.895 0.029 204.78);
--accent: oklch(0.35 0.089 331.146);
--accent-foreground: oklch(0.864 0.049 329.208);
--destructive: oklch(0.463 0.148 39.195);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.43 0.066 113.922);
--chart-1: oklch(0.43 0.066 113.922);
--chart-2: oklch(0.401 0.046 204.941);
--chart-3: oklch(0.35 0.089 331.146);
--chart-4: oklch(0.435 0.051 204.962);
--chart-5: oklch(0.436 0.071 114.089);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.126 0.012 111.978);
--foreground: oklch(1 0 180);
--muted: oklch(0.195 0.017 204.722);
--muted-foreground: oklch(0.725 0.027 204.76);
--popover: oklch(0.126 0.012 111.978);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.144 0.014 112.001);
--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.43 0.066 113.922);
--primary-foreground: oklch(0.913 0.04 111.829);
--secondary: oklch(0.401 0.046 204.941);
--secondary-foreground: oklch(0.895 0.029 204.78);
--accent: oklch(0.35 0.089 331.146);
--accent-foreground: oklch(0.864 0.049 329.208);
--destructive: oklch(0.696 0.201 41.115);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.43 0.066 113.922);
--chart-1: oklch(0.43 0.066 113.922);
--chart-2: oklch(0.401 0.046 204.941);
--chart-3: oklch(0.35 0.089 331.146);
--chart-4: oklch(0.435 0.051 204.962);
--chart-5: oklch(0.436 0.071 114.089);
}